In tensorflow, Resnet101 has 5 conv layers . If ip is of 960960, then conv1, pool2,conv3-3, conv5-3 has resolution 480480,240240,120120, 60*60.
Now i want to get intermediate layer outputs @conv1,@pool2,@conv3-3, @conv5-3. How to get the intermediate layers output of pretrained model in tensorflow.
Kindly help
In the session run you can pass the name of the layer (you can get the heirarchy using Tensorboard visualization of the graph) .
For example:
feat_0=detection_graph.get_tensor_by_name('FeatureExtractor/MobilenetV2/expanded_conv_13/expansion_output:0')
feat_1=detection_graph.get_tensor_by_name('FeatureExtractor/MobilenetV2/Conv_1/Relu6:0')
(Feat_0,Feat_2) = sess.run( [feat_0,feat_1], feed_dict={image_tensor: img_expanded})
Thanks Sukanya-Kudi for the answer, I think that should work.
Thanks sukanya for your fruitful suggestions
any way to do this using the keras APIs?
Most helpful comment
any way to do this using the keras APIs?