1、原始模型
onnx转caffe报错没有globalaverage层。
于是转化成:
onnx转化caffe之后,修改prototxt文件,加上globalaverage和reshape层.
参考:https://blog.csdn.net/z649431508/article/details/113425275
layer {
name: “GlobalAveragePool_12”
type: “Pooling”
bottom: “107”
top: “108”
pooling_param {
pool: AVE
global_pooling: true
}
}
量化时报错,kernel size is too large, kernel_h = 9
改成
layer {
name: “GlobalAveragePool_12”
type: “Pooling”
bottom: “107”
top: “108”
pooling_param {
pool: AVE
kernel_h:6
stride_h:6
kernel_w:8
stride_w:8
}
}
还是报错,kernel size is too large, kernel_h = 6
改成
layer {
name: “GlobalAveragePool_12”
type: “Pooling”
bottom: “107”
top: “108”
pooling_param {
pool: AVE
kernel_h:4
stride_h:4
kernel_w:3
stride_w:3
}
}
还是报错,kernel size is too large, kernel_h = 4
应该是这样直接在prototxt里边改不对。