ncnn icon indicating copy to clipboard operation
ncnn copied to clipboard

find_blob_index_by_name failed when loading int8 version .param

Open hiigao opened this issue 8 years ago • 1 comments

Dear, all, I just want to try the quantize function of the latest ncnn, but I met the following problem:

find_blob_index_by_name block_3_1 failed
network graph not ready
find_blob_index_by_name data failed
find_blob_index_by_name prob failed
段错误 (核心已转储)

I use the mobilenetv2 model, and find something odd in my ".param" file. In the top of the file, all the things are about the structure of the network. Then, the rest the of the content, I think, is about the calibration parameters of the layers. It seems that not all of them correspond to the counterpart the layers.

7767517
112 112
Input            data             0 1 data 0=224 1=224 2=3
Convolution      conv1            1 1 data conv1 0=32 1=3 2=1 3=2 4=1 5=0 6=864 8=6.02188568e+01
BatchNorm        conv1/bn         1 1 conv1 conv1_conv1/bn 0=32
Scale            conv1/scale      1 1 conv1_conv1/bn conv1_conv1/scale 0=32 1=1
ReLU             relu1            1 1 conv1_conv1/scale conv1_relu1
ConvolutionDepthWise conv2_1/dw       1 1 conv1_relu1 conv2_1/dw 0=32 1=3 2=1 3=1 4=1 5=0 6=288 7=32
BatchNorm        conv2_1/dw/bn    1 1 conv2_1/dw conv2_1/dw_conv2_1/dw/bn 0=32
Scale            conv2_1/dw/scale 1 1 conv2_1/dw_conv2_1/dw/bn conv2_1/dw_conv2_1/dw/scale 0=32 1=1
ReLU             relu2_1/dw       1 1 conv2_1/dw_conv2_1/dw/scale conv2_1/dw_relu2_1/dw
Convolution      conv2_1/sep      1 1 conv2_1/dw_relu2_1/dw conv2_1/sep 0=64 1=1 2=1 3=1 4=0 5=0 6=2048
BatchNorm        conv2_1/sep/bn   1 1 conv2_1/sep conv2_1/sep_conv2_1/sep/bn 0=64
Scale            conv2_1/sep/scale 1 1 conv2_1/sep_conv2_1/sep/bn conv2_1/sep_conv2_1/sep/scale 0=64 1=1
ReLU             relu2_1/sep      1 1 conv2_1/sep_conv2_1/sep/scale conv2_1/sep_relu2_1/sep
.
.
.
ConvolutionDepthWise conv6/dw         1 1 conv5_6/sep_relu5_6/sep conv6/dw 0=1024 1=3 2=1 3=1 4=1 5=0 6=9216 7=1024
BatchNorm        conv6/dw/bn      1 1 conv6/dw conv6/dw_conv6/dw/bn 0=1024
Scale            conv6/dw/scale   1 1 conv6/dw_conv6/dw/bn conv6/dw_conv6/dw/scale 0=1024 1=1
ReLU             relu6/dw         1 1 conv6/dw_conv6/dw/scale conv6/dw_relu6/dw
Convolution      conv6/sep        1 1 conv6/dw_relu6/dw conv6/sep 0=1024 1=1 2=1 3=1 4=0 5=0 6=1048576
BatchNorm        conv6/sep/bn     1 1 conv6/sep conv6/sep_conv6/sep/bn 0=1024
Scale            conv6/sep/scale  1 1 conv6/sep_conv6/sep/bn conv6/sep_conv6/sep/scale 0=1024 1=1
ReLU             relu6/sep        1 1 conv6/sep_conv6/sep/scale conv6/sep_relu6/sep
Pooling          pool6            1 1 conv6/sep_relu6/sep pool6 0=1 1=0 2=1 3=0 4=1
Convolution      fc7              1 1 pool6 fc7 0=1000 1=1 2=1 3=1 4=0 5=1 6=1024000 8=9.82844772e+01
Softmax          prob             1 1 fc7 prob 0=0
block_3_1        0=8.51389694e+00
block_4_1        0=1.17046204e+01
block_4_2        0=1.21879578e+01
block_4_4        0=1.48823338e+01
block_4_5        0=1.27231607e+01
block_4_6        0=1.08611898e+01
block_5_1        0=1.46440172e+01
block_5_2        0=1.24891415e+01
block_6_1        0=1.67350750e+01
block_6_2        0=1.45868788e+01
conv1            0=1.62354488e+01
conv2_1/dwise    0=2.76175880e+01
conv2_1/expand   0=3.27696648e+01
conv2_1/linear   0=7.76812363e+00
.
.
.
conv6_1/dwise    0=6.39853745e+01
conv6_1/expand   0=6.00146713e+01
conv6_1/linear   0=3.01576729e+01
conv6_2/dwise    0=4.71045151e+01
conv6_2/expand   0=6.96402969e+01
conv6_2/linear   0=2.44669304e+01
conv6_3/dwise    0=4.39295464e+01
conv6_3/expand   0=5.65676346e+01
conv6_3/linear   0=2.76411362e+01
conv6_4          0=6.28446388e+00
data             0=4.94665184e+01
fc7              0=3.85843444e+00
pool6            0=2.38564510e+01
prob             0=2.02409338e+03

Maybe I do something wrong. So how it works?

hiigao avatar Jul 30 '18 10:07 hiigao

please try the latest code, and check if the problem still exists

nihui avatar Aug 27 '18 11:08 nihui