1
我正在通過來自here的泰坦尼克號教程。完成後,我想保存模型,然後再加載它。保存之後,我得到一個警告提示:無法使用TensorFlow和TFLEARN保存或加載模型
TensorFlow's V1 checkpoint format has been deprecated.
WARNING:tensorflow:Consider switching to the more efficient V2 format:
當我打開它,我得到一個錯誤說
NotFoundError (see above for traceback): Unsuccessful TensorSliceReader constructor: Failed to find any matching files for model.tflearn
[[Node: save_1/RestoreV2_2 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save_1/Const_0, save_1/RestoreV2_2/tensor_names, save_1/RestoreV2_2/shape_and_slices)]]
這是我如何保存/載入模型。
net = tflearn.input_data(shape=[None, 6])
net = tflearn.fully_connected(net, 32)
net = tflearn.fully_connected(net, 32)
net = tflearn.fully_connected(net, 2, activation='softmax')
net = tflearn.regression(net)
model = tflearn.DNN(net)
model.fit(data, labels, n_epoch=10, batch_size=16, show_metric=True)
model.save('model.tflearn')
,然後當我打開它,我只是做了...
model.load('model.tflearn')
如果任何人誰擁有經驗,這可能給我的手,我將不勝感激,謝謝。
請不要忘記解釋/評論你的代碼,並提供相關文件[來自評論] – Blag