tensorflow-mnist-cnn icon indicating copy to clipboard operation
tensorflow-mnist-cnn copied to clipboard

No model.ckpt was saved under dierctory model/

Open bababadboy opened this issue 6 years ago • 1 comments

I ran python mnist_cnn_train.py in terminal and the terminal returned

Optimization` Finished!
test accuracy for the stored model: 0.9932

Training logs are saved in "logs/train" , however, there is no trained model saved as "model/model01_99.61/model.ckpt" or in other directories. When I run python mnist_cnn_test.py --model-dir model/model01_99.61 --batch-size 5000 --use-ensemble False and it returns an error message:

NotFoundError (see above for traceback): Key fc3/BatchNorm/beta not found in checkpoint
	 [[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]

Where is the problem?

bababadboy avatar Oct 04 '18 12:10 bababadboy

If you use Windows, you should run "python mnist_cnn_test.py --model-dir /model/model01_99.61 --batch-size 5000 --use-ensemble True" All you have to do is add a '/' before "model" Then your code can run.

liaoweiquan avatar Dec 01 '18 10:12 liaoweiquan