标题: caffe转rknn出错 [打印本页] 作者: 虚无灵幻 时间: 2022-2-18 09:35 标题: caffe转rknn出错 root@f3231724c48f:/test/rknn_openpose# python3 rknn_transfer.py
--> config model
done
--> Loading model
W Unknown caffe layer loss_stage1_L1, op is euclideanloss, please REMOVE it from prototxt if possible.
W Unknown caffe layer loss_stage1_L2, op is euclideanloss, please REMOVE it from prototxt if possible.
W Unknown caffe layer loss_stage2_L1, op is euclideanloss, please REMOVE it from prototxt if possible.
W Unknown caffe layer loss_stage2_L2, op is euclideanloss, please REMOVE it from prototxt if possible.
W Unknown caffe layer loss_stage3_L1, op is euclideanloss, please REMOVE it from prototxt if possible.
W Unknown caffe layer loss_stage3_L2, op is euclideanloss, please REMOVE it from prototxt if possible.
W Unknown caffe layer loss_stage4_L1, op is euclideanloss, please REMOVE it from prototxt if possible.
W Unknown caffe layer loss_stage4_L2, op is euclideanloss, please REMOVE it from prototxt if possible.
W Unknown caffe layer loss_stage5_L1, op is euclideanloss, please REMOVE it from prototxt if possible.
W Unknown caffe layer loss_stage5_L2, op is euclideanloss, please REMOVE it from prototxt if possible.
W Unknown caffe layer loss_stage6_L1, op is euclideanloss, please REMOVE it from prototxt if possible.
W Unknown caffe layer loss_stage6_L2, op is euclideanloss, please REMOVE it from prototxt if possible.
E Catch exception when loading caffe model: ./pose_train_test.prototxt!
E Traceback (most recent call last):
E File "rknn/api/rknn_base.py", line 261, in rknn.api.rknn_base.RKNNBase.load_caffe
E File "rknn/base/RKNNlib/RK_nn.py", line 74, in rknn.base.RKNNlib.RK_nn.RKnn.load_caffe
E File "rknn/base/RKNNlib/RKNNnetbuilder.py", line 400, in rknn.base.RKNNlib.RKNNnetbuilder.RKNNNetBuilder.build
E File "rknn/base/RKNNlib/RKNNnetbuilder.py", line 426, in rknn.base.RKNNlib.RKNNnetbuilder.RKNNNetBuilder.build_layer
E File "rknn/base/RKNNlib/RKNNnetbuilder.py", line 426, in rknn.base.RKNNlib.RKNNnetbuilder.RKNNNetBuilder.build_layer
E File "rknn/base/RKNNlib/RKNNnetbuilder.py", line 438, in rknn.base.RKNNlib.RKNNnetbuilder.RKNNNetBuilder.build_layer
E File "rknn/base/RKNNlib/layer/RKNNlayer.py", line 265, in rknn.base.RKNNlib.layer.RKNNlayer.RKNNLayer.compute_shape
E File "rknn/base/RKNNlib/layer/eltwise.py", line 42, in rknn.base.RKNNlib.layer.eltwise.EltWise.compute_out_shape
E AttributeError: 'NoneType' object has no attribute 'shape'
Load model failed!
root@f3231724c48f:/test/rknn_openpose# python3 rknn_transfer.py
--> config model
done
--> Loading model
W Unknown caffe layer loss_stage1_L1, op is euclideanloss, please REMOVE it from prototxt if possible.
W Unknown caffe layer loss_stage1_L2, op is euclideanloss, please REMOVE it from prototxt if possible.
W Unknown caffe layer loss_stage2_L1, op is euclideanloss, please REMOVE it from prototxt if possible.
W Unknown caffe layer loss_stage2_L2, op is euclideanloss, please REMOVE it from prototxt if possible.
W Unknown caffe layer loss_stage3_L1, op is euclideanloss, please REMOVE it from prototxt if possible.
W Unknown caffe layer loss_stage3_L2, op is euclideanloss, please REMOVE it from prototxt if possible.
W Unknown caffe layer loss_stage4_L1, op is euclideanloss, please REMOVE it from prototxt if possible.
W Unknown caffe layer loss_stage4_L2, op is euclideanloss, please REMOVE it from prototxt if possible.
W Unknown caffe layer loss_stage5_L1, op is euclideanloss, please REMOVE it from prototxt if possible.
W Unknown caffe layer loss_stage5_L2, op is euclideanloss, please REMOVE it from prototxt if possible.
W Unknown caffe layer loss_stage6_L1, op is euclideanloss, please REMOVE it from prototxt if possible.
W Unknown caffe layer loss_stage6_L2, op is euclideanloss, please REMOVE it from prototxt if possible.
E Catch exception when loading caffe model: ./pose_train_test.prototxt!
E Traceback (most recent call last):
E File "rknn/api/rknn_base.py", line 261, in rknn.api.rknn_base.RKNNBase.load_caffe
E File "rknn/base/RKNNlib/RK_nn.py", line 74, in rknn.base.RKNNlib.RK_nn.RKnn.load_caffe
E File "rknn/base/RKNNlib/RKNNnetbuilder.py", line 400, in rknn.base.RKNNlib.RKNNnetbuilder.RKNNNetBuilder.build
E File "rknn/base/RKNNlib/RKNNnetbuilder.py", line 426, in rknn.base.RKNNlib.RKNNnetbuilder.RKNNNetBuilder.build_layer
E File "rknn/base/RKNNlib/RKNNnetbuilder.py", line 426, in rknn.base.RKNNlib.RKNNnetbuilder.RKNNNetBuilder.build_layer
E File "rknn/base/RKNNlib/RKNNnetbuilder.py", line 438, in rknn.base.RKNNlib.RKNNnetbuilder.RKNNNetBuilder.build_layer
E File "rknn/base/RKNNlib/layer/RKNNlayer.py", line 265, in rknn.base.RKNNlib.layer.RKNNlayer.RKNNLayer.compute_shape
E File "rknn/base/RKNNlib/layer/eltwise.py", line 42, in rknn.base.RKNNlib.layer.eltwise.EltWise.compute_out_shape
E AttributeError: 'NoneType' object has no attribute 'shape'
Load model failed! 作者: 虚无灵幻 时间: 2022-2-18 09:47
layer {
name: "data"
type: "CPMData"
top: "data"
top: "label"
data_param {
source: "/home/zhecao/COCO_kpt/lmdb_trainVal"
batch_size: 10
backend: LMDB
}
cpm_transform_param {
stride: 8
max_rotate_degree: 40
visualize: false
crop_size_x: 368
crop_size_y: 368
scale_prob: 1
scale_min: 0.5
scale_max: 1.1
target_dist: 0.6
center_perterb_max: 40
do_clahe: false
num_parts: 56
np_in_lmdb: 17
}
}
layer {
name: "vec_weight"
type: "Slice"
bottom: "label"
top: "vec_weight"
top: "heat_weight"
top: "vec_temp"
top: "heat_temp"
slice_param {
slice_point: 38
slice_point: 57
slice_point: 95
axis: 1
}
}
layer {
name: "label_vec"
type: "Eltwise"
bottom: "vec_weight"
bottom: "vec_temp"
top: "label_vec"
eltwise_param {
operation: PROD
}
}
layer {
name: "label_heat"
type: "Eltwise"
bottom: "heat_weight"
bottom: "heat_temp"
top: "label_heat"
eltwise_param {
operation: PROD
}
}
layer {
name: "image"
type: "Slice"
bottom: "data"
top: "image"
top: "center_map"
slice_param {
slice_point: 3
axis: 1
}
}
layer {
name: "silence2"
type: "Silence"
bottom: "center_map"
}
layer {
name: "conv1_1"
type: "Convolution"
bottom: "image"
top: "conv1_1"
param {
lr_mult: 1.0
decay_mult: 1
}
原来的prototxt怎么改