deeponet
deeponet copied to clipboard
ValueError: The passed save_path is not a valid checkpoint: model/model.ckpt-43000
How to fix this problem?
raceback (most recent call last):
File "D:/Desktop/Codes/deeponet-master/deeponet-master/src/deeponet_pde.py", line 285, in
What is your backend?
font{
line-height: 1.6;
}
ul,ol{
padding-left: 20px;
list-style-position: inside;
}
tf2.x
On 12/7/2021 09:20,Lu ***@***.***> wrote:
What is your backend?
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications on the go with GitHub Mobile for iOS or Android.
You could replace the error line with model.restore(f"model/model-{train_state.best_step}.ckpt", verbose=1)
@minzhu-penn - May I know which version of TensorFlow you use and which backend?
I had to do this:
model.restore("model/model.ckpt-" + str(train_state.best_step) + ".ckpt", verbose=1)
Because model files are like:
model.ckpt-500.ckpt.meta
model.ckpt-500.ckpt.index
model.ckpt-500.ckpt.data-00000-of-00001
Backend: tensorflow.compat.v1 TensorFlow version: 2.6.2
@JianfengNing I have the same problem as you. You can check the running memory of the computer.
I am getting this error as well! My backend is : Using backend: tensorflow.compat.v1'
code:
# Restore the best test loss model
model.restore( save_dir +save_str+"/model.ckpt-" + str(np.argmin(model.losshistory.loss_test)*100), verbose=0)
Error:
Traceback (most recent call last):
File "/Users/anshumansinha/Desktop/ML_project/./main.py", line 311, in <module>
NN_MSEs_test, NN_MSEs_train = DeepONet(samples, split, y/np.max(np.abs(y)) , I, inds, neurons, epochs, b_layers)
File "/Users/anshumansinha/Desktop/ML_project/./main.py", line 289, in DeepONet
model.restore( save_dir +save_str+"/model.ckpt-" + str(np.argmin(model.losshistory.loss_test)*100), verbose=0)
File "/Users/anshumansinha/venv/lib/python3.10/site-packages/deepxde/model.py", line 914, in restore
self.saver.restore(self.sess, save_path)
File "/Users/anshumansinha/venv/lib/python3.10/site-packages/tensorflow/python/training/saver.py", line 1409, in restore
raise ValueError("The passed save_path is not a valid checkpoint: " +
ValueError: The passed save_path is not a valid checkpoint: /Users/anshumansinha/Desktop/ML_project/model/Levin1_Seed_1_Samples_100_X_4_5_epochs_10_blayers_3_neurons_125/model.ckpt-100
What is your backend?
I am using, `Using backend: tensorflow.compat.v1' and getting similar error : link
See FAQ Q: More details about DeepXDE source code, and want to modify DeepXDE at https://deepxde.readthedocs.io/en/latest/user/faq.html