keras-deeplab-v3-plus
keras-deeplab-v3-plus copied to clipboard
module 'tensorflow._api.v2.train' has no attribute 'NewCheckpointReader'
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.
use previous version dataset with tensorflow 1.13 and keras 2.24 this error will not occur
@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
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)
I just added the fix above to my PR that upgrades this repo to TensorFlow 2.0Beta-1:
https://github.com/bonlime/keras-deeplab-v3-plus/pull/109
use tf.compat.v1.train.NewCheckpointReader and it works @ZhonghuaTian