alphapose-yolov3-spp导出onnx
您好: 看了您的转换,很厉害,如果我直接在alphapose代码中导出yolov3-spp加了convcat等操作报错,请帮忙指导一下
def load_yolo_model(args): print('loading yolo model ...') det_model = Darknet("yolo/cfg/yolov3-spp.cfg") det_model.load_weights('models/yolo/yolov3-spp.weights') det_model.net_info['height'] = args.inp_dim det_inp_dim = int(det_model.net_info['height']) assert det_inp_dim % 32 == 0 assert det_inp_dim > 32 det_model.cuda() det_model.eval() dummy_input = torch.randn(1, 3, 608, 608, device='cuda') torch.onnx.export(det_model, dummy_input, './yolov3-spp-cat.onnx', verbose=True, opset_version=11)
报错:
Loading pose model from ./models/sppe/duc_se.pth
loading yolo model ...
/home/trq/wanda/AlphaPose_wanda/yolo/util.py:53: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
grid_len = np.arange(grid_size)
/home/trq/wanda/AlphaPose_wanda/yolo/util.py:53: TracerWarning: Converting a tensor to a Python float might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
grid_len = np.arange(grid_size)
/home/trq/wanda/AlphaPose_wanda/yolo/util.py:68: TracerWarning: Converting a tensor to a Python float might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
anchors = torch.FloatTensor(anchors)
Traceback (most recent call last):
File "/home/trq/wanda/AlphaPose_wanda/demo.py", line 191, in