How to use pretrained model in current version of tensorflow2 with tensorflow.compat.v1?
gitlabspy opened this issue · 2 comments
It throws error:
"The name 'import/input/image:0' refers to a Tensor which does not exist. The operation, 'import/input/image', does not exist in the graph."
I tried:
changed
tf.get_default_graph().get_tensor_by_name('import/' + name + ':0')
into 'import/' + name + ':0'
it works on loading model but it throws errors when using encode
/decode
:
Cannot interpret feed_dict key as Tensor: The name 'import/input/image:0' refers to a Tensor which does not exist. The operation, 'import/input/image', does not exist in the graph.
Any way to make it work on tf2?
Found it!
import tensorflow.compat.v1 as tf
tf.disable_eager_execution()
It throws error:
"The name 'import/input/image:0' refers to a Tensor which does not exist. The operation, 'import/input/image', does not exist in the graph."
I tried:
changed
tf.get_default_graph().get_tensor_by_name('import/' + name + ':0')
into'import/' + name + ':0'
it works on loading model but it throws errors when usingencode
/decode
:
Cannot interpret feed_dict key as Tensor: The name 'import/input/image:0' refers to a Tensor which does not exist. The operation, 'import/input/image', does not exist in the graph.
Any way to make it work on tf2?
Hello, would you please share your trained checkpoints for 256×256?
I am so GPU hungry. thanks a lot !!!