Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I want to extract the neural activation from the Fully connected layers. In Caffe i was doing like this net.blobs[layer_name].data

How can i do the same in tensorflow?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
291 views
Welcome To Ask or Share your Answers For Others

1 Answer

You should use session object to get values stored in tensors. Try not to forget to pass values of placeholder tensors as feed_dict.

sess = tf.InteractiveSesssion()

full_connected = ....
value_of_fully_connected = sess.run(fully_connected,feed_dict={your_placeholders_and_values)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...