Extracting data from pre-trained tensorflow model
Hello,
I'm trying to extract data and print the names and shapes of each layer. I am not sure I have this correctly.
root@:~/test/ssd_mobilenet_v1_coco_2017_11_17# python /home/root/ComputeLibraryNEON/scripts/tensorflow_data_extractor.py -m model.ckpt -n model.ckpt.meta
Model restored.
Where the *.npy files are generated? Are they saved into ComputeLibraryNEON/data/fixed_point/ folder?
My model folder is
-rw-r--r-- 1 root root 77 Nov 18 2017 checkpoint
-rw-r--r-- 1 root root 29112121 Nov 18 2017 frozen_inference_graph.pb
-rw-r--r-- 1 root root 27380740 Nov 18 2017 model.ckpt.data-00000-of-00001
-rw-r--r-- 1 root root 8937 Nov 18 2017 model.ckpt.index
-rw-r--r-- 1 root root 3038417 Nov 18 2017 model.ckpt.meta
Thank you.
Hello @peter73421,
When you run the script it should produce the files in the folder that you run it from.
per doc if the script runs successfully, it should print the names and shapes of each parameter and generates .npy files... I see
root:~/test/ssd_mobilenet_v1_coco_2017_11_17# python /home/root/test/ComputeLibrary/scripts/tensorflow_data_extractor.py -m model.ckpt -n model.ckpt.meta
Model restored.
no print of names/shapes, and no *npy files
i also encounter the same problem.
It could be the tf.GraphKeys problem as mentioned in the tensorflow_data_extractor.py, try GLOBAL_VARIABLES instead of TRAINABLE_VARIABLES.
Could it be related to #324 ?
I also encounter the same problem.
Could you try with our script in the development repo? git clone https://review.mlplatform.org/ml/ComputeLibrary
The script is called in the directory scripts and you can call it in this way:
python tf_frozen_model_extractor.py -m ssd_mobilenet_v1_coco_2017_11_17/frozen_inference_graph.pb -d output
I am assuming the directory ssd_mobilenet_v1_coco_2017_11_17 is in scripts too.
Thanks, Manuel
PS: There is a similar issue with an updated version of the network. https://github.com/ARM-software/ComputeLibrary/issues/617