下のように,学習済みのモデルの重みの保存をしようとしているのですが,
python
1model_unet.save_weights("saved_model.ckpt", save_format="tf")
以下のようなエラーが出ます.
Traceback (most recent call last): File "main_trained_model_saved.py", line 177, in <module> train(parser) File "main_trained_model_saved.py", line 142, in train model_unet.save_weights("saved_model.ckpt", save_format="tf") File "C:\Users\scoop\apps\anaconda3\2020.11\envs\py36_tfgpu\lib\site-packages\tensorflow\python\keras\engine\training.py", line 2046, in save_weights self._assert_weights_created() File "C:\Users\scoop\apps\anaconda3\2020.11\envs\py36_tfgpu\lib\site-packages\tensorflow\python\keras\engine\training.py", line 2439, in _assert_weights_created if self.dynamic: File "C:\Users\scoop\apps\anaconda3\2020.11\envs\py36_tfgpu\lib\site-packages\tensorflow\python\keras\engine\base_layer_v1.py", line 850, in dynamic return any(layer._dynamic for layer in self._flatten_layers()) File "C:\Users\scoop\apps\anaconda3\2020.11\envs\py36_tfgpu\lib\site-packages\tensorflow\python\keras\engine\base_layer_v1.py", line 850, in <genexpr> return any(layer._dynamic for layer in self._flatten_layers()) AttributeError: 'Model' object has no attribute '_dynamic'
解決策をご教示頂けますと助かります.
あなたの回答
tips
プレビュー