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

module 'tensorflow._api.v2.train' has no attribute 'NewCheckpointReader' #96

Open
ZhonghuaTian opened this issue May 5, 2019 · 5 comments

Comments

@ZhonghuaTian
Copy link

module 'tensorflow._api.v2.train' has no attribute 'NewCheckpointReader'
when I try to extract weights from previous trained model this issue happened, My tensorflow version is 2.0alpha, and cuda is 10.1.

@shubhaminnani
Copy link

use previous version dataset with tensorflow 1.13 and keras 2.24 this error will not occur

@sachsbl
Copy link
Contributor

sachsbl commented Jun 15, 2019

@shubhaminnani that answer works, but a legit solution for TensorFlow 2.0+ is still required. Does anyone know of the new syntax? I couldn't find a clear explanation in the docs but will dive deeper

@gafrome
Copy link

gafrome commented Jun 17, 2019

From looking at the TF source for v2.0.0-beta1 here it looks like this should work as a drop-in:

reader = tf.train.load_checkpoint(filename)

@sachsbl
Copy link
Contributor

sachsbl commented Jun 18, 2019

I just added the fix above to my PR that upgrades this repo to TensorFlow 2.0Beta-1:

#109

@shubhaminnani
Copy link

use tf.compat.v1.train.NewCheckpointReader and it works @ZhonghuaTian

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

4 participants