I would like this question answered, because I have the same problem:
Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
What is the top-level directory of the model you are using
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce
http://download.tensorflow.org/models/object_detection/
No
uname -a
Linux ludovic-lenovo 4.18.3-arch1-1-ARCH #1 SMP PREEMPT Sat Aug 18 09:22:54 UTC 2018 x86_64 GNU/Linux
Run this code in the folder of the model (example, from "mask_rcnn_inception_v2_coco_2018_01_28", downloaded in here)
import tensorflow as tf
saver = tf.train.import_meta_graph('model.ckpt.meta')
sess = tf.Session()
saver.restore(sess, 'model.ckpt')
print(tf.trainable_variables()) # outputs `[]`
print(sess.graph.collections) # outputs `[]`
print(tf.global_variables()) # outputs `[]`
print(tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES)) # outputs `[]`
Any update ?
I have the same issue with other checkpoints from here. Any update?
Reporting in with the same issue... trying to fine tune based on faster_rcnn_resnet50_coco
No trainable variables... when i list the checkpoint i can see 326 vars but once i restore they're gone.
Am i missing something?
Same issue.
Hi There,
We are checking to see if you still need help on this, as this seems to be considerably old issue. Please update this issue with the latest information, code snippet to reproduce your issue and error you are seeing.
If we don't hear from you in the next 7 days, this issue will be closed automatically. If you don't need help on this issue any more, please consider closing this.
Hi, same issue here hoping for a remedy. This is the method I have written to count the number of trainable parameters in a graph.
def get_modelsize(graph_def, precision):
tf.compat.v1.reset_default_graph()
graph = tf.Graph()
with graph.as_default():
tf.import_graph_def(graph_def)
total_params = 0
for variable in tf.compat.v1.trainable_variables():
shape = variable.get_shape()
print(shape)
print(len(shape))
variable_params = 1
for dim in shape:
print(dim)
variable_params *= dim.value
print(variable_params)
total_params += variable_params
return total_params
Most helpful comment
http://download.tensorflow.org/models/object_detection/
No
Run this code in the folder of the model (example, from "mask_rcnn_inception_v2_coco_2018_01_28", downloaded in here)