|
你看下转换过程中的log是否有区分same和valid。
我这边简单测试了下,rknn对same和valid是有区分的,out的shape也不一样,我用的是tf.nn.conv2d
same模式:op1_conv_same = tf.nn.conv2d(input, filter1, strides=[1, 2, 2, 1], padding='SAME')
D Process attach_input/out0_1 ...
D RKNN output shape(input): (0 5 5 1)
D Process Conv2D_3 ...
D RKNN output shape(convolution): (0 3 3 1)
D Process attach_out/out0_0 ...
D RKNN output shape(output): (0 3 3 1)
I Build conv_same complete.
valid模式:op2_conv_valid = tf.nn.conv2d(input, filter1, strides=[1, 2, 2, 1], padding='VALID')
D Process attach_input/out0_1 ...
D RKNN output shape(input): (0 5 5 1)
D Process Conv2D_1_3 ...
D RKNN output shape(convolution): (0 2 2 1)
D Process attach_out/out0_0 ...
D RKNN output shape(output): (0 2 2 1)
I Build conv_valid complete. |
|