display the gaph of a .ckpt model
Tailor2019 opened this issue · comments
Hello!
@ChWick
@andbue
I'm trying to display the architecture of a .ckpt model
I'm using this code
import tensorflow.compat.v1 as tf tf.disable_v2_behavior() tf.train.import_meta_graph("./0.ckpt.h5") for n in tf.get_default_graph().as_graph_def().node: print(n) with tf.Session() as sess: writer = tf.summary.FileWriter("./output/", sess.graph) writer.close()
But it not working
Please what code to use with these options
--model.layers.0.name --model.layers.0.filters --model.layers.0.kernel_size --model.layers.0.strides --model.layers.0.padding --model.layers.0.activation --model.layers.1.name --model.layers.1.name ...................
to display the architecture of a particular model
Have a look at
calamari/calamari_ocr/ocr/predict/predictor.py
Lines 20 to 32 in a378469
on how to load a saved model.
Hello!
@andbue
Thanks for your help
But the solution returns me this error :
Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
What can I use as restore operator please to solve this problem?
Thanks a lot!
Without your code I can only guess here: maybe the file path is wrong? It has to be something like "path/to/model/0.ckpt" without any further file endings.
Thanks I resolve this problem.