Hello,
I try to convert a Tensorflow Squeezenet model (protobuf.pb) to a dlc.
The Squeezenet model is defined using python:
//some other layers
net = slim.conv2d(net, 1000, [1, 1], activation_fn=None, normalizer_fn=None, scope='conv10')
net = slim.avg_pool2d(net, net.get_shape()[1:3], scope='avgpool10')
net = tf.squeeze(net, [1, 2], name='logits')
net = slim.fully_connected(net, bottleneck_layer_size, activation_fn=None, scope='Bottleneck', reuse=False)
My command:
./snpe-tensorflow-to-dlc --graph 'protobuf.pb' --input_dim 'input' 160,160,3 --out_node embeddings --allow_unconsumed_nodes
fails:
tensorflow/layers/reshape.py:78: RuntimeWarning: error_code=1004; error_message=Layer parameters combination is invalid. Layer squeezenet/Bottleneck/BatchNorm/Reshape:0: tensor size mismatch between input {1, 1, 1000} and output {1, 1, 128}; error_component=Model Validation; line_no=138; thread_id=140398003033920
descriptor.output_names[0])
2017-12-04 10:58:52,241 - 123 - ERROR - Conversion failed: ERROR_TF_LAYER_INPUT_COUNT_ERROR: Layer AvgPooling expects 1 input(s), actual 2
When I load the same protobuf.pb in python using Tensorflow ther is no problem. How can i fix the poblem and convert the model?
Please provide a complete minimal example which illustrates the issue as text or pb file (preferable).