Hi,
I converted a model whose architecuture Mobilenet+last layer as dense layer with 10 units.
The conversion process was from keras to onnx to dlc. I'm using SNPE version 1.56.2.3050.
During the conversion I got the following warning messages:
2022-01-30 13:35:03,013 - 219 - WARNING - WARNING_GEMM: GEMM operation is not supported in the general case, attempting to interpret as FC
2022-01-30 13:35:03,127 - 214 - INFO - INFO_DLC_SAVE_LOCATION: Saving model at mobilenet_weights_224.dlc
/snpe-1.56.2.3050/lib/python/qti/aisw/converters/backend/ir_to_dlc.py:877: RuntimeWarning: info_code=1004; message=Layer parameters combination is invalid. Layer model/dense/MatMul_Gemm__6: mismatch between size of input model/global_average_pooling2d/Mean:0_model/global_average_pooling2d/Mean_Squeeze__225.ncs (1024) and width of weight matrix (10); component=Model Validation; line_no=1588; thread_id=140266431653696
node.output_names[0])
2022-01-30 13:35:03,217 - 214 - INFO - INFO_CONVERSION_SUCCESS: Conversion completed successfully
When I tried to build an snpe object, I got a similar error at the model validation part:
error_code=1004; error_message=Layer parameters combination is invalid. error_code=1004; error_message=Layer parameters combination is invalid. Layer model/dense/MatMul_Gemm__6: mismatch between size of input model/global_average_pooling2d/Mean:0_model/global_average_pooling2d/Mean_Squeeze__225.ncs (1024) and width of weight matrix (10); error_component=Model Validation; line_no=1533; thread_id=522626589936; error_component=Model Validation; line_no=262; thread_id=522646467912
Just to mention that the keras and onnx model runs fine in Python.
I noticed your supported onnx ops list:
https://developer.qualcomm.com/sites/default/files/docs/snpe/supported_o...
Where it is said that Gemm is only supported in the case it used to emulate FC.
The model archituecture (keras model.summary() output):
_________________________________________________________________Layer (type) Output Shape Param #=================================================================input_1 (InputLayer) [(1, 224, 224, 3)] 0conv1 (Conv2D) (None, None, None, 32) 864conv1_bn (BatchNormalizatio (None, None, None, 32) 128n)conv1_relu (ReLU) (None, None, None, 32) 0conv_dw_1 (DepthwiseConv2D) (None, None, None, 32) 288conv_dw_1_bn (BatchNormaliz (None, None, None, 32) 128ation)conv_dw_1_relu (ReLU) (None, None, None, 32) 0conv_pw_1 (Conv2D) (None, None, None, 64) 2048conv_pw_1_bn (BatchNormaliz (None, None, None, 64) 256ation)conv_pw_1_relu (ReLU) (None, None, None, 64) 0conv_pad_2 (ZeroPadding2D) (None, None, None, 64) 0conv_dw_2 (DepthwiseConv2D) (None, None, None, 64) 576conv_dw_2_bn (BatchNormaliz (None, None, None, 64) 256ation)conv_dw_2_relu (ReLU) (None, None, None, 64) 0conv_pw_2 (Conv2D) (None, None, None, 128) 8192conv_pw_2_bn (BatchNormaliz (None, None, None, 128) 512ation)conv_pw_2_relu (ReLU) (None, None, None, 128) 0conv_dw_3 (DepthwiseConv2D) (None, None, None, 128) 1152conv_dw_3_bn (BatchNormaliz (None, None, None, 128) 512ation)conv_dw_3_relu (ReLU) (None, None, None, 128) 0conv_pw_3 (Conv2D) (None, None, None, 128) 16384conv_pw_3_bn (BatchNormaliz (None, None, None, 128) 512ation)conv_pw_3_relu (ReLU) (None, None, None, 128) 0conv_pad_4 (ZeroPadding2D) (None, None, None, 128) 0conv_dw_4 (DepthwiseConv2D) (None, None, None, 128) 1152conv_dw_4_bn (BatchNormaliz (None, None, None, 128) 512ation)conv_dw_4_relu (ReLU) (None, None, None, 128) 0conv_pw_4 (Conv2D) (None, None, None, 256) 32768conv_pw_4_bn (BatchNormaliz (None, None, None, 256) 1024ation)conv_pw_4_relu (ReLU) (None, None, None, 256) 0conv_dw_5 (DepthwiseConv2D) (None, None, None, 256) 2304conv_dw_5_bn (BatchNormaliz (None, None, None, 256) 1024ation)conv_dw_5_relu (ReLU) (None, None, None, 256) 0conv_pw_5 (Conv2D) (None, None, None, 256) 65536conv_pw_5_bn (BatchNormaliz (None, None, None, 256) 1024ation)conv_pw_5_relu (ReLU) (None, None, None, 256) 0conv_pad_6 (ZeroPadding2D) (None, None, None, 256) 0conv_dw_6 (DepthwiseConv2D) (None, None, None, 256) 2304conv_dw_6_bn (BatchNormaliz (None, None, None, 256) 1024ation)conv_dw_6_relu (ReLU) (None, None, None, 256) 0conv_pw_6 (Conv2D) (None, None, None, 512) 131072conv_pw_6_bn (BatchNormaliz (None, None, None, 512) 2048ation)conv_pw_6_relu (ReLU) (None, None, None, 512) 0conv_dw_7 (DepthwiseConv2D) (None, None, None, 512) 4608conv_dw_7_bn (BatchNormaliz (None, None, None, 512) 2048ation)conv_dw_7_relu (ReLU) (None, None, None, 512) 0conv_pw_7 (Conv2D) (None, None, None, 512) 262144conv_pw_7_bn (BatchNormaliz (None, None, None, 512) 2048ation)conv_pw_7_relu (ReLU) (None, None, None, 512) 0conv_dw_8 (DepthwiseConv2D) (None, None, None, 512) 4608conv_dw_8_bn (BatchNormaliz (None, None, None, 512) 2048ation)conv_dw_8_relu (ReLU) (None, None, None, 512) 0conv_pw_8 (Conv2D) (None, None, None, 512) 262144conv_pw_8_bn (BatchNormaliz (None, None, None, 512) 2048ation)conv_pw_8_relu (ReLU) (None, None, None, 512) 0conv_dw_9 (DepthwiseConv2D) (None, None, None, 512) 4608conv_dw_9_bn (BatchNormaliz (None, None, None, 512) 2048ation)conv_dw_9_relu (ReLU) (None, None, None, 512) 0conv_pw_9 (Conv2D) (None, None, None, 512) 262144conv_pw_9_bn (BatchNormaliz (None, None, None, 512) 2048ation)conv_pw_9_relu (ReLU) (None, None, None, 512) 0conv_dw_10 (DepthwiseConv2D (None, None, None, 512) 4608)conv_dw_10_bn (BatchNormali (None, None, None, 512) 2048zation)conv_dw_10_relu (ReLU) (None, None, None, 512) 0conv_pw_10 (Conv2D) (None, None, None, 512) 262144conv_pw_10_bn (BatchNormali (None, None, None, 512) 2048zation)conv_pw_10_relu (ReLU) (None, None, None, 512) 0conv_dw_11 (DepthwiseConv2D (None, None, None, 512) 4608)conv_dw_11_bn (BatchNormali (None, None, None, 512) 2048zation)conv_dw_11_relu (ReLU) (None, None, None, 512) 0conv_pw_11 (Conv2D) (None, None, None, 512) 262144conv_pw_11_bn (BatchNormali (None, None, None, 512) 2048zation)conv_pw_11_relu (ReLU) (None, None, None, 512) 0conv_pad_12 (ZeroPadding2D) (None, None, None, 512) 0conv_dw_12 (DepthwiseConv2D (None, None, None, 512) 4608)conv_dw_12_bn (BatchNormali (None, None, None, 512) 2048zation)conv_dw_12_relu (ReLU) (None, None, None, 512) 0conv_pw_12 (Conv2D) (None, None, None, 1024) 524288conv_pw_12_bn (BatchNormali (None, None, None, 1024) 4096zation)conv_pw_12_relu (ReLU) (None, None, None, 1024) 0conv_dw_13 (DepthwiseConv2D (None, None, None, 1024) 9216)conv_dw_13_bn (BatchNormali (None, None, None, 1024) 4096zation)conv_dw_13_relu (ReLU) (None, None, None, 1024) 0conv_pw_13 (Conv2D) (None, None, None, 1024) 1048576conv_pw_13_bn (BatchNormali (None, None, None, 1024) 4096zation)conv_pw_13_relu (ReLU) (None, None, None, 1024) 0global_average_pooling2d (G (None, 1024) 0lobalAveragePooling2D)dense (Dense) (None, 10) 10250=================================================================Total params: 3,239,114Trainable params: 0Non-trainable params: 3,239,114_________________________________________________________________
[input: "input"output: "model/conv1/Conv2D__7:0"name: "model/conv1/Conv2D__7"op_type: "Transpose"attribute {name: "perm"ints: 0ints: 3ints: 1ints: 2type: INTS}, input: "model/conv1/Conv2D__7:0"input: "model/conv1/Conv2D_weights_fused_bn"input: "model/conv1/Conv2D_bias_fused_bn"output: "model/conv1_bn/FusedBatchNormV3:0"name: "model/conv1/Conv2D"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 2ints: 2type: INTS}attribute {name: "kernel_shape"ints: 3ints: 3type: INTS}attribute {name: "pads"ints: 0ints: 0ints: 1ints: 1type: INTS}attribute {name: "group"i: 1type: INT}, input: "model/conv1_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv1_relu/Relu6:0"name: "model/conv1_relu/Relu6"op_type: "Clip", input: "model/conv1_relu/Relu6:0"input: "model/conv_dw_1/depthwise_weights_fused_bn"input: "model/conv_dw_1/depthwise_bias_fused_bn"output: "model/conv_dw_1_bn/FusedBatchNormV3:0"name: "model/conv_dw_1/depthwise"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 1ints: 1type: INTS}attribute {name: "kernel_shape"ints: 3ints: 3type: INTS}attribute {name: "group"i: 32type: INT}attribute {name: "pads"ints: 1ints: 1ints: 1ints: 1type: INTS}, input: "model/conv_dw_1_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_dw_1_relu/Relu6:0"name: "model/conv_dw_1_relu/Relu6"op_type: "Clip", input: "model/conv_dw_1_relu/Relu6:0"input: "model/conv_pw_1/Conv2D_weights_fused_bn"input: "model/conv_pw_1/Conv2D_bias_fused_bn"output: "model/conv_pw_1_bn/FusedBatchNormV3:0"name: "model/conv_pw_1/Conv2D"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 1ints: 1type: INTS}attribute {name: "kernel_shape"ints: 1ints: 1type: INTS}attribute {name: "pads"ints: 0ints: 0ints: 0ints: 0type: INTS}attribute {name: "group"i: 1type: INT}, input: "model/conv_pw_1_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_pw_1_relu/Relu6:0"name: "model/conv_pw_1_relu/Relu6"op_type: "Clip", input: "model/conv_pw_1_relu/Relu6:0"input: "pad_const__28"output: "model/conv_pad_2/Pad:0"name: "model/conv_pad_2/Pad"op_type: "Pad", input: "model/conv_pad_2/Pad:0"input: "model/conv_dw_2/depthwise_weights_fused_bn"input: "model/conv_dw_2/depthwise_bias_fused_bn"output: "model/conv_dw_2_bn/FusedBatchNormV3:0"name: "model/conv_dw_2/depthwise"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 2ints: 2type: INTS}attribute {name: "kernel_shape"ints: 3ints: 3type: INTS}attribute {name: "group"i: 64type: INT}, input: "model/conv_dw_2_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_dw_2_relu/Relu6:0"name: "model/conv_dw_2_relu/Relu6"op_type: "Clip", input: "model/conv_dw_2_relu/Relu6:0"input: "model/conv_pw_2/Conv2D_weights_fused_bn"input: "model/conv_pw_2/Conv2D_bias_fused_bn"output: "model/conv_pw_2_bn/FusedBatchNormV3:0"name: "model/conv_pw_2/Conv2D"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 1ints: 1type: INTS}attribute {name: "kernel_shape"ints: 1ints: 1type: INTS}attribute {name: "pads"ints: 0ints: 0ints: 0ints: 0type: INTS}attribute {name: "group"i: 1type: INT}, input: "model/conv_pw_2_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_pw_2_relu/Relu6:0"name: "model/conv_pw_2_relu/Relu6"op_type: "Clip", input: "model/conv_pw_2_relu/Relu6:0"input: "model/conv_dw_3/depthwise_weights_fused_bn"input: "model/conv_dw_3/depthwise_bias_fused_bn"output: "model/conv_dw_3_bn/FusedBatchNormV3:0"name: "model/conv_dw_3/depthwise"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 1ints: 1type: INTS}attribute {name: "kernel_shape"ints: 3ints: 3type: INTS}attribute {name: "group"i: 128type: INT}attribute {name: "pads"ints: 1ints: 1ints: 1ints: 1type: INTS}, input: "model/conv_dw_3_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_dw_3_relu/Relu6:0"name: "model/conv_dw_3_relu/Relu6"op_type: "Clip", input: "model/conv_dw_3_relu/Relu6:0"input: "model/conv_pw_3/Conv2D_weights_fused_bn"input: "model/conv_pw_3/Conv2D_bias_fused_bn"output: "model/conv_pw_3_bn/FusedBatchNormV3:0"name: "model/conv_pw_3/Conv2D"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 1ints: 1type: INTS}attribute {name: "kernel_shape"ints: 1ints: 1type: INTS}attribute {name: "pads"ints: 0ints: 0ints: 0ints: 0type: INTS}attribute {name: "group"i: 1type: INT}, input: "model/conv_pw_3_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_pw_3_relu/Relu6:0"name: "model/conv_pw_3_relu/Relu6"op_type: "Clip", input: "model/conv_pw_3_relu/Relu6:0"input: "pad_const__28"output: "model/conv_pad_4/Pad:0"name: "model/conv_pad_4/Pad"op_type: "Pad", input: "model/conv_pad_4/Pad:0"input: "model/conv_dw_4/depthwise_weights_fused_bn"input: "model/conv_dw_4/depthwise_bias_fused_bn"output: "model/conv_dw_4_bn/FusedBatchNormV3:0"name: "model/conv_dw_4/depthwise"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 2ints: 2type: INTS}attribute {name: "kernel_shape"ints: 3ints: 3type: INTS}attribute {name: "group"i: 128type: INT}, input: "model/conv_dw_4_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_dw_4_relu/Relu6:0"name: "model/conv_dw_4_relu/Relu6"op_type: "Clip", input: "model/conv_dw_4_relu/Relu6:0"input: "model/conv_pw_4/Conv2D_weights_fused_bn"input: "model/conv_pw_4/Conv2D_bias_fused_bn"output: "model/conv_pw_4_bn/FusedBatchNormV3:0"name: "model/conv_pw_4/Conv2D"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 1ints: 1type: INTS}attribute {name: "kernel_shape"ints: 1ints: 1type: INTS}attribute {name: "pads"ints: 0ints: 0ints: 0ints: 0type: INTS}attribute {name: "group"i: 1type: INT}, input: "model/conv_pw_4_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_pw_4_relu/Relu6:0"name: "model/conv_pw_4_relu/Relu6"op_type: "Clip", input: "model/conv_pw_4_relu/Relu6:0"input: "model/conv_dw_5/depthwise_weights_fused_bn"input: "model/conv_dw_5/depthwise_bias_fused_bn"output: "model/conv_dw_5_bn/FusedBatchNormV3:0"name: "model/conv_dw_5/depthwise"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 1ints: 1type: INTS}attribute {name: "kernel_shape"ints: 3ints: 3type: INTS}attribute {name: "group"i: 256type: INT}attribute {name: "pads"ints: 1ints: 1ints: 1ints: 1type: INTS}, input: "model/conv_dw_5_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_dw_5_relu/Relu6:0"name: "model/conv_dw_5_relu/Relu6"op_type: "Clip", input: "model/conv_dw_5_relu/Relu6:0"input: "model/conv_pw_5/Conv2D_weights_fused_bn"input: "model/conv_pw_5/Conv2D_bias_fused_bn"output: "model/conv_pw_5_bn/FusedBatchNormV3:0"name: "model/conv_pw_5/Conv2D"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 1ints: 1type: INTS}attribute {name: "kernel_shape"ints: 1ints: 1type: INTS}attribute {name: "pads"ints: 0ints: 0ints: 0ints: 0type: INTS}attribute {name: "group"i: 1type: INT}, input: "model/conv_pw_5_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_pw_5_relu/Relu6:0"name: "model/conv_pw_5_relu/Relu6"op_type: "Clip", input: "model/conv_pw_5_relu/Relu6:0"input: "pad_const__28"output: "model/conv_pad_6/Pad:0"name: "model/conv_pad_6/Pad"op_type: "Pad", input: "model/conv_pad_6/Pad:0"input: "model/conv_dw_6/depthwise_weights_fused_bn"input: "model/conv_dw_6/depthwise_bias_fused_bn"output: "model/conv_dw_6_bn/FusedBatchNormV3:0"name: "model/conv_dw_6/depthwise"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 2ints: 2type: INTS}attribute {name: "kernel_shape"ints: 3ints: 3type: INTS}attribute {name: "group"i: 256type: INT}, input: "model/conv_dw_6_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_dw_6_relu/Relu6:0"name: "model/conv_dw_6_relu/Relu6"op_type: "Clip", input: "model/conv_dw_6_relu/Relu6:0"input: "model/conv_pw_6/Conv2D_weights_fused_bn"input: "model/conv_pw_6/Conv2D_bias_fused_bn"output: "model/conv_pw_6_bn/FusedBatchNormV3:0"name: "model/conv_pw_6/Conv2D"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 1ints: 1type: INTS}attribute {name: "kernel_shape"ints: 1ints: 1type: INTS}attribute {name: "pads"ints: 0ints: 0ints: 0ints: 0type: INTS}attribute {name: "group"i: 1type: INT}, input: "model/conv_pw_6_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_pw_6_relu/Relu6:0"name: "model/conv_pw_6_relu/Relu6"op_type: "Clip", input: "model/conv_pw_6_relu/Relu6:0"input: "model/conv_dw_7/depthwise_weights_fused_bn"input: "model/conv_dw_7/depthwise_bias_fused_bn"output: "model/conv_dw_7_bn/FusedBatchNormV3:0"name: "model/conv_dw_7/depthwise"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 1ints: 1type: INTS}attribute {name: "kernel_shape"ints: 3ints: 3type: INTS}attribute {name: "group"i: 512type: INT}attribute {name: "pads"ints: 1ints: 1ints: 1ints: 1type: INTS}, input: "model/conv_dw_7_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_dw_7_relu/Relu6:0"name: "model/conv_dw_7_relu/Relu6"op_type: "Clip", input: "model/conv_dw_7_relu/Relu6:0"input: "model/conv_pw_7/Conv2D_weights_fused_bn"input: "model/conv_pw_7/Conv2D_bias_fused_bn"output: "model/conv_pw_7_bn/FusedBatchNormV3:0"name: "model/conv_pw_7/Conv2D"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 1ints: 1type: INTS}attribute {name: "kernel_shape"ints: 1ints: 1type: INTS}attribute {name: "pads"ints: 0ints: 0ints: 0ints: 0type: INTS}attribute {name: "group"i: 1type: INT}, input: "model/conv_pw_7_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_pw_7_relu/Relu6:0"name: "model/conv_pw_7_relu/Relu6"op_type: "Clip", input: "model/conv_pw_7_relu/Relu6:0"input: "model/conv_dw_8/depthwise_weights_fused_bn"input: "model/conv_dw_8/depthwise_bias_fused_bn"output: "model/conv_dw_8_bn/FusedBatchNormV3:0"name: "model/conv_dw_8/depthwise"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 1ints: 1type: INTS}attribute {name: "kernel_shape"ints: 3ints: 3type: INTS}attribute {name: "group"i: 512type: INT}attribute {name: "pads"ints: 1ints: 1ints: 1ints: 1type: INTS}, input: "model/conv_dw_8_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_dw_8_relu/Relu6:0"name: "model/conv_dw_8_relu/Relu6"op_type: "Clip", input: "model/conv_dw_8_relu/Relu6:0"input: "model/conv_pw_8/Conv2D_weights_fused_bn"input: "model/conv_pw_8/Conv2D_bias_fused_bn"output: "model/conv_pw_8_bn/FusedBatchNormV3:0"name: "model/conv_pw_8/Conv2D"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 1ints: 1type: INTS}attribute {name: "kernel_shape"ints: 1ints: 1type: INTS}attribute {name: "pads"ints: 0ints: 0ints: 0ints: 0type: INTS}attribute {name: "group"i: 1type: INT}, input: "model/conv_pw_8_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_pw_8_relu/Relu6:0"name: "model/conv_pw_8_relu/Relu6"op_type: "Clip", input: "model/conv_pw_8_relu/Relu6:0"input: "model/conv_dw_9/depthwise_weights_fused_bn"input: "model/conv_dw_9/depthwise_bias_fused_bn"output: "model/conv_dw_9_bn/FusedBatchNormV3:0"name: "model/conv_dw_9/depthwise"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 1ints: 1type: INTS}attribute {name: "kernel_shape"ints: 3ints: 3type: INTS}attribute {name: "group"i: 512type: INT}attribute {name: "pads"ints: 1ints: 1ints: 1ints: 1type: INTS}, input: "model/conv_dw_9_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_dw_9_relu/Relu6:0"name: "model/conv_dw_9_relu/Relu6"op_type: "Clip", input: "model/conv_dw_9_relu/Relu6:0"input: "model/conv_pw_9/Conv2D_weights_fused_bn"input: "model/conv_pw_9/Conv2D_bias_fused_bn"output: "model/conv_pw_9_bn/FusedBatchNormV3:0"name: "model/conv_pw_9/Conv2D"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 1ints: 1type: INTS}attribute {name: "kernel_shape"ints: 1ints: 1type: INTS}attribute {name: "pads"ints: 0ints: 0ints: 0ints: 0type: INTS}attribute {name: "group"i: 1type: INT}, input: "model/conv_pw_9_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_pw_9_relu/Relu6:0"name: "model/conv_pw_9_relu/Relu6"op_type: "Clip", input: "model/conv_pw_9_relu/Relu6:0"input: "model/conv_dw_10/depthwise_weights_fused_bn"input: "model/conv_dw_10/depthwise_bias_fused_bn"output: "model/conv_dw_10_bn/FusedBatchNormV3:0"name: "model/conv_dw_10/depthwise"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 1ints: 1type: INTS}attribute {name: "kernel_shape"ints: 3ints: 3type: INTS}attribute {name: "group"i: 512type: INT}attribute {name: "pads"ints: 1ints: 1ints: 1ints: 1type: INTS}, input: "model/conv_dw_10_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_dw_10_relu/Relu6:0"name: "model/conv_dw_10_relu/Relu6"op_type: "Clip", input: "model/conv_dw_10_relu/Relu6:0"input: "model/conv_pw_10/Conv2D_weights_fused_bn"input: "model/conv_pw_10/Conv2D_bias_fused_bn"output: "model/conv_pw_10_bn/FusedBatchNormV3:0"name: "model/conv_pw_10/Conv2D"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 1ints: 1type: INTS}attribute {name: "kernel_shape"ints: 1ints: 1type: INTS}attribute {name: "pads"ints: 0ints: 0ints: 0ints: 0type: INTS}attribute {name: "group"i: 1type: INT}, input: "model/conv_pw_10_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_pw_10_relu/Relu6:0"name: "model/conv_pw_10_relu/Relu6"op_type: "Clip", input: "model/conv_pw_10_relu/Relu6:0"input: "model/conv_dw_11/depthwise_weights_fused_bn"input: "model/conv_dw_11/depthwise_bias_fused_bn"output: "model/conv_dw_11_bn/FusedBatchNormV3:0"name: "model/conv_dw_11/depthwise"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 1ints: 1type: INTS}attribute {name: "kernel_shape"ints: 3ints: 3type: INTS}attribute {name: "group"i: 512type: INT}attribute {name: "pads"ints: 1ints: 1ints: 1ints: 1type: INTS}, input: "model/conv_dw_11_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_dw_11_relu/Relu6:0"name: "model/conv_dw_11_relu/Relu6"op_type: "Clip", input: "model/conv_dw_11_relu/Relu6:0"input: "model/conv_pw_11/Conv2D_weights_fused_bn"input: "model/conv_pw_11/Conv2D_bias_fused_bn"output: "model/conv_pw_11_bn/FusedBatchNormV3:0"name: "model/conv_pw_11/Conv2D"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 1ints: 1type: INTS}attribute {name: "kernel_shape"ints: 1ints: 1type: INTS}attribute {name: "pads"ints: 0ints: 0ints: 0ints: 0type: INTS}attribute {name: "group"i: 1type: INT}, input: "model/conv_pw_11_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_pw_11_relu/Relu6:0"name: "model/conv_pw_11_relu/Relu6"op_type: "Clip", input: "model/conv_pw_11_relu/Relu6:0"input: "pad_const__28"output: "model/conv_pad_12/Pad:0"name: "model/conv_pad_12/Pad"op_type: "Pad", input: "model/conv_pad_12/Pad:0"input: "model/conv_dw_12/depthwise_weights_fused_bn"input: "model/conv_dw_12/depthwise_bias_fused_bn"output: "model/conv_dw_12_bn/FusedBatchNormV3:0"name: "model/conv_dw_12/depthwise"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 2ints: 2type: INTS}attribute {name: "kernel_shape"ints: 3ints: 3type: INTS}attribute {name: "group"i: 512type: INT}, input: "model/conv_dw_12_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_dw_12_relu/Relu6:0"name: "model/conv_dw_12_relu/Relu6"op_type: "Clip", input: "model/conv_dw_12_relu/Relu6:0"input: "model/conv_pw_12/Conv2D_weights_fused_bn"input: "model/conv_pw_12/Conv2D_bias_fused_bn"output: "model/conv_pw_12_bn/FusedBatchNormV3:0"name: "model/conv_pw_12/Conv2D"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 1ints: 1type: INTS}attribute {name: "kernel_shape"ints: 1ints: 1type: INTS}attribute {name: "pads"ints: 0ints: 0ints: 0ints: 0type: INTS}attribute {name: "group"i: 1type: INT}, input: "model/conv_pw_12_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_pw_12_relu/Relu6:0"name: "model/conv_pw_12_relu/Relu6"op_type: "Clip", input: "model/conv_pw_12_relu/Relu6:0"input: "model/conv_dw_13/depthwise_weights_fused_bn"input: "model/conv_dw_13/depthwise_bias_fused_bn"output: "model/conv_dw_13_bn/FusedBatchNormV3:0"name: "model/conv_dw_13/depthwise"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 1ints: 1type: INTS}attribute {name: "kernel_shape"ints: 3ints: 3type: INTS}attribute {name: "group"i: 1024type: INT}attribute {name: "pads"ints: 1ints: 1ints: 1ints: 1type: INTS}, input: "model/conv_dw_13_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_dw_13_relu/Relu6:0"name: "model/conv_dw_13_relu/Relu6"op_type: "Clip", input: "model/conv_dw_13_relu/Relu6:0"input: "model/conv_pw_13/Conv2D_weights_fused_bn"input: "model/conv_pw_13/Conv2D_bias_fused_bn"output: "model/conv_pw_13_bn/FusedBatchNormV3:0"name: "model/conv_pw_13/Conv2D"op_type: "Conv"attribute {name: "dilations"ints: 1ints: 1type: INTS}attribute {name: "strides"ints: 1ints: 1type: INTS}attribute {name: "kernel_shape"ints: 1ints: 1type: INTS}attribute {name: "pads"ints: 0ints: 0ints: 0ints: 0type: INTS}attribute {name: "group"i: 1type: INT}, input: "model/conv_pw_13_bn/FusedBatchNormV3:0"input: "model/conv_dw_3_relu/Relu6_min__51"input: "model/conv_pw_4_relu/Relu6_max__74"output: "model/conv_pw_13_relu/Relu6:0"name: "model/conv_pw_13_relu/Relu6"op_type: "Clip", input: "model/conv_pw_13_relu/Relu6:0"output: "model/global_average_pooling2d/Mean:0"name: "model/global_average_pooling2d/Mean"op_type: "GlobalAveragePool", input: "model/global_average_pooling2d/Mean:0"output: "model/global_average_pooling2d/Mean_Squeeze__225:0"name: "model/global_average_pooling2d/Mean_Squeeze__225"op_type: "Squeeze"attribute {name: "axes"ints: 2ints: 3type: INTS}domain: "", input: "model/global_average_pooling2d/Mean_Squeeze__225:0"input: "model/dense/MatMul/ReadVariableOp:0"input: "model/dense/BiasAdd/ReadVariableOp:0"output: "model/dense/MatMul_Gemm__6:0"name: "model/dense/MatMul_Gemm__6"op_type: "Gemm"attribute {name: "transA"i: 0type: INT}attribute {name: "transB"i: 0type: INT}domain: "", input: "model/dense/MatMul_Gemm__6:0"output: "dense"name: "model/dense/Softmax"op_type: "Softmax"attribute {name: "axis"i: 1type: INT}]
can you provide your onnx model ?
Hi,
i notice snpe enforces transB=1,weights have to be transposebut your model protoc message show transB=0,maybe that's rootcause.