尝试了一下 RepVGG-A0 的TensorRT序列化,遇到了下面这个问题:
Caffe Parser: Invalid axis in softmax layer - TensorRT expects NCHW input. Negative axis is not supported in TensorRT, please use positive axis indexing
error parsing layer type Softmax
看了一下prototxt: softmax前面,只有 Reshape layer里面是没有显示的指定NCHW【-1表示是自己推理处理】。
所以,稍微调整一下Reshape layer,将缺省维度参数补全即可:
layer {
name: "view1"
type: "Reshape"
bottom: "ave_pool_blob1"
top: "view_blob1"
reshape_param {
shape {
dim: 0
dim: -1
dim: 1
dim: 1
}
}
}