TensorFlow2教程 TensorFlow 2.0 Tutorial 入门教程实战案例
469
16
189

您好,请教下在for i in range(episodes): 下面,也就是第52行,model 还没开始train怎么去做choose_action里的predict?

Traceback (most recent call last):
File "predict.py", line 30, in
app = Predict()
File "predict.py", line 13, in init
self.cnn.model.load_weights(latest,by_name=True)
File "/home/jinx/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training.py", line 181, in load_weights
return super(Model, self).load_weights(filepath, by_name)
File "/home/jinx/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/network.py", line 1139, in load_weights
if _is_hdf5_filepath(filepath):
File "/home/jinx/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/network.py", line 1449, in _is_hdf5_filepath
return (filepath.endswith('.h5') or filepath.endswith('.keras') or
AttributeError: 'NoneType' object has no attribute 'endswith'