网络结构只有一层?是验证单层精度吗?输入是实际输入吗,结果准确性和cpu对比?
这是use_firstconv=1生成的pt文件:layer { name: "input" type: "Input" top: "input" input_param { shape { dim: 1 dim: 3 dim: 384 dim: 384 } }}layer { name: "conv1" type: "Convolution" bottom: "input" top: "conv1" convolution_param { num_output: 64 bias_term: false stride: 2 pad_h: 3 pad_w: 3 kernel_h: 7 kernel_w: 7 mean_value: 0 mean_value: 0 mean_value: 0 std: 1 } bottom_mlu_dtype { type: DT_INT8 position: 2 scale: 1.9921569 } blobs_dtype { type: DT_INT8 position: -8 scale: 1.5965673 }}这是use_firstconv=0生成的pt文件:layer { name: "input" type: "Input" top: "input" input_param { shape { dim: 1 dim: 3 dim: 384 dim: 384 } }}layer { name: "conv1" type: "Convolution" bottom: "input" top: "conv1" convolution_param { num_output: 64 bias_term: false stride: 2 pad_h: 3 pad_w: 3 kernel_h: 7 kernel_w: 7 } bottom_mlu_dtype { type: DT_INT8 position: 2 scale: 1.9921569 } blobs_dtype { type: DT_INT8 position: -8 scale: 1.5965673 }}展开
这是use_firstconv=1生成的pt文件:
layer {
name: "input"
type: "Input"
top: "input"
input_param {
shape {
dim: 1
dim: 3
dim: 384
dim: 384
}
}
}
layer {
name: "conv1"
type: "Convolution"
bottom: "input"
top: "conv1"
convolution_param {
num_output: 64
bias_term: false
stride: 2
pad_h: 3
pad_w: 3
kernel_h: 7
kernel_w: 7
mean_value: 0
mean_value: 0
mean_value: 0
std: 1
}
bottom_mlu_dtype {
type: DT_INT8
position: 2
scale: 1.9921569
}
blobs_dtype {
type: DT_INT8
position: -8
scale: 1.5965673
}
}
这是use_firstconv=0生成的pt文件:
layer {
name: "input"
type: "Input"
top: "input"
input_param {
shape {
dim: 1
dim: 3
dim: 384
dim: 384
}
}
}
layer {
name: "conv1"
type: "Convolution"
bottom: "input"
top: "conv1"
convolution_param {
num_output: 64
bias_term: false
stride: 2
pad_h: 3
pad_w: 3
kernel_h: 7
kernel_w: 7
}
bottom_mlu_dtype {
type: DT_INT8
position: 2
scale: 1.9921569
}
blobs_dtype {
type: DT_INT8
position: -8
scale: 1.5965673
}
}
firstconv不会影响精度,如果结果不同,建议检查一下生成的pt文件中第一个conv中记录的mean_value 和std是否正确展开
请登录后评论