Environment: Win10 + tensorflow2.3.1 + python3.6
File "C:\Users\12575\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\keras\callbacks.py", line 1330, in _get_file_path
file_path = self.filepath.format(epoch=epoch + 1, **logs)
KeyError: 'batch'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:/WData/Development/table_direction_detection/4_directions/Derection-Classify/train.py", line 168, in <module>
trainer.train()
File "D:/WData/Development/table_direction_detection/4_directions/Derection-Classify/train.py", line 131, in train
callbacks=callbacks)
File "C:\Users\12575\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\keras\engine\training.py", line 108, in _method_wrapper
return method(self, *args, **kwargs)
File "C:\Users\12575\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\keras\engine\trainin

在Windows 10环境下,使用TensorFlow 2.3.1和Python 3.6时,遇到模型保存时的KeyError问题。问题源于尝试格式化回调文件路径'./saved_models/model_batch{batch}.h5'失败。解决方案在于修正配置文件config.yml中相关路径设置。
最低0.47元/天 解锁文章
6万+

被折叠的 条评论
为什么被折叠?



