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

KeyError: "The name 'keras_learning_phase:0' refers to a Tensor which does not exist #180

Open
Saqueeb opened this issue Jul 12, 2021 · 3 comments

Comments

@Saqueeb
Copy link

Saqueeb commented Jul 12, 2021

installed library version:
tensorflow==1.15.0
cv==4.20
python==3.6.13

Description

Steps to Reproduce

tried:
python train_tf.py
--weightspath COVID-Net/COVIDNet-CXR4-A
--metaname model.meta
--ckptname model-18540
--n_classes 3
--trainfile COVID-Net/train_split_new.txt \ #this train file is produced during data preparation
--testfile COVID-Net/test_split_new.txt \ #this test file is produced during data preparation
--out_tensorname norm_dense_1/Softmax:0
--logit_tensorname norm_dense_1/MatMul:0

Expected behavior

KeyError: "The name 'keras_learning_phase:0' refers to a Tensor which does not exist. The operation, 'keras_learning_phase', does not exist in the graph."

Can anyone faced it? What is the reason? How do I solve it?

@SamanehShamshiri
Copy link

I have the same error, could you solve the problem?

@Saqueeb
Copy link
Author

Saqueeb commented Mar 2, 2022

as far as I remember, it was due to some library version mismatch. Try creating a new Conda environment and install the requirements.txt.

@Saqueeb
Copy link
Author

Saqueeb commented Mar 2, 2022

I used python 3.6 and lower version for opencv>4.2, you may try these.

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