Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while running CNN #36

Open
anujgupta82 opened this issue Feb 8, 2018 · 2 comments
Open

Error while running CNN #36

anujgupta82 opened this issue Feb 8, 2018 · 2 comments

Comments

@anujgupta82
Copy link

anujgupta82 commented Feb 8, 2018

I tried to the CNN using command given in README.md

       ./dense_classifier.py --train_file ./data/lung/fa7a21165ae152b13def786e6afc3edf.dcm.csv.tfrecords --validate_file ./data/lung/fa7a21165ae152b13def786e6afc3edf.dcm.csv.tfrecords --feature_size 262144 --label_size 2 --batch_size 2 --validate_batch_size 2 --epoch_number -1 --model cnn

I get the following error

File "/home/root1/.virtualenv/tensorflow_template_application/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1363, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.NotFoundError: Key conv0/bias not found in checkpoint
	 [[Node: save/RestoreV2 = RestoreV2[dtypes=[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)]]

Caused by op u'save/RestoreV2', defined at:
  File "./dense_classifier.py", line 580, in <module>
    main()
  File "./dense_classifier.py", line 438, in main
    saver = tf.train.Saver()



NotFoundError (see above for traceback): Key conv0/bias not found in checkpoint
	 [[Node: save/RestoreV2 = RestoreV2[dtypes=[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)]]
@tobegit3hub
Copy link
Owner

It seems that you have saved the checkpoint in other network. This script will try to load the checkpoint from the path "./checkpoint" firstly and it throws errors when you change the model network.

Please try deleting the path of "./checkpoint" and try again.

@anujgupta82
Copy link
Author

anujgupta82 commented Feb 9, 2018

The problem seems to be bit more.

I deleted the "./checkpoint" and ran the command

./dense_classifier.py --train_file ./data/lung/fa7a21165ae152b13def786e6afc3edf.dcm.csv.tfrecords --validate_file ./data/lung/fa7a21165ae152b13def786e6afc3edf.dcm.csv.tfrecords --feature_size 262144 --label_size 2 --batch_size 2 --validate_batch_size 2 --epoch_number -1 --model cnn

It worked like a charm. However, after this when I run

./dense_classifier.py 

It complains
NotFoundError (see above for traceback): Key input/biases not found in checkpoint

If you delete "./checkpoint" again and run

./dense_classifier.py 

it runs smoothly, however now if you run cnn, it will complain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants