My environment: Ubuntu14.04 / Python 2.7 / tensorflow 1.3.0 / SNPE 1.13.0
I build a simple network for testing depthwise layer convertion with code
img = tf.placeholder(tf.float32, shape=[None, 128, 128, 1], name='ODD')kernel_shape = [3, 3, 1, 2] # in_channel=1, depth_multiplier=2stride_shape = [1, 1, 1, 1]depth_kernel = tf.get_variable('DepthConv/depth_kernel', shape=kernel_shape, dtype=tf.float32)logits = tf.nn.depthwise_conv2d(img, depth_kernel, strides=stride_shape, padding='SAME', name='DepthConv/depthwise2d')
snpe-tensorflow-to-dlc --graph ${graph} --input_dim ODD 128,128,1 --out_node DepthConv/depthwise2d --verbose
/home/jerrywj/snpe-1.13.0/lib/python/converters/tensorflow/layers/convolution.py:336: RuntimeWarning: error_code=1002; error_message=Layer paramter value is invalid. Layer DepthConv/depthwise2d: weights have wrong number of input channels; error_component=Model Validation; line_no=587; thread_id=139731316676416
This time it works.
To summary, this problem seems happened when depth multiplier > 1.
I want to ask that does anyone face the same problem as mine?
The maximum value of depth multiplier is 1?