'Details of a pre-trained model loaded from a pb file
I loaded a pretrained detection model as the following, and now I want to see the details and summarize of this model. I want to find the output of this model at the layer before fully connected layer.
Is there anybody to help me?
def _load_model(model_path):
detection_graph = tf.Graph()
with detection_graph.as_default():
od_graph_def = tf.compat.v1.GraphDef()
with tf.compat.v2.io.gfile.GFile(model_path, 'rb') as fid:
serialized_graph = fid.read()
od_graph_def.ParseFromString(serialized_graph)
tf.import_graph_def(od_graph_def, name='')
my_model = _load_model(model_path)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
