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

about bottleneck_input = tf.placeholder_with_default ? #21

Open
mymuli opened this issue Jun 9, 2019 · 0 comments
Open

about bottleneck_input = tf.placeholder_with_default ? #21

mymuli opened this issue Jun 9, 2019 · 0 comments

Comments

@mymuli
Copy link

mymuli commented Jun 9, 2019

In the original retrain.py:
bottleneck_input = tf.placeholder_with_default(
bottleneck_tensor, shape=[batch_size, bottleneck_tensor_size],
name='BottleneckInputPlaceholder')
Changed to:
bottleneck_input = tf.placeholder(
tf.float32, shape=[batch_size, bottleneck_tensor_size], name='BottleneckInputPlaceholder')

After training, check the parameters in retrained_graph.pb.
Utilize:
import tensorflow as tf
import os

model_name = 'retrained_graph.pb'
def create_graph():
with tf.gfile.FastGFile(os.path.join(model_name), 'rb') as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
create_graph()

tensor_name_list = [tensor.name for tensor in tf.get_default_graph().as_graph_def().node]
for tensor_name in tensor_name_list:
print(tensor_name,'\n')

Before BOTTLENECK_TENSOR_NAME = 'pool_3/_reshape:0' was discovered, all the parameters were missing. Why?

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

1 participant