在我将cudnnlstm模型保存在tensorflow 1.13.1中后,我尝试立即将其加载以使用它。
我得到以下错误
typeError :('关键字参数不了解:','time_major')。
我浏览了Python的TensorFlow的源代码,看来基类_CuDNNRNN()
的_init__()
已完全删除了time_major
的初始化。
那为什么time_major
写入model.save()
?
更改导入
from keras.models import model_from_json
to
from tensorflow.keras.models import model_from_json
在我的情况下帮助。