ValueError: Incorrect setting for output(s) of operator "unsqueeze2", should set: [XShape].
ValueError: Incorrect setting for output(s) of operator "unsqueeze2", should set: [XShape]. 跑yolov6s ACT自动蒸馏量化用自己的数据集,output8个类别的权重转成onnx,数据集配置成类似COCO文件格式跑的,出现这个报错什么问题?
yolov6s_v2_qat_dis.yaml里面是这样设置的:
model_dir: ./weights/best_ckpt.onnx image_path: None # If image_path is set, it will be trained directly based on unlabeled images, no need to set the COCO dataset path. coco_dataset_dir: /PaddleSlim/dataset/output/ coco_train_image_dir: /PaddleSlim/dataset/output/images/train coco_train_anno_path: /PaddleSlim/dataset/output/annotations/instances_train2017.json coco_val_image_dir: /PaddleSlim/dataset/output/images/val coco_val_anno_path: /PaddleSlim/dataset/output/annotations/instances_val2017.json
具体报错信息如下:
loading annotations into memory...
Done (t=1.31s)
creating index...
index created!
loading annotations into memory...
Done (t=0.11s)
creating index...
index created!
2023-09-05 03:53:17,517-INFO: Loaded model from: ./weights/best_ckpt_infer
W0905 03:53:17.518724 17334 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 8.6, Driver API Version: 11.7, Runtime API Version: 11.2
W0905 03:53:17.523062 17334 gpu_resources.cc:91] device: 0, cuDNN Version: 8.1.
2023-09-05 03:53:18,756-INFO: devices: gpu
2023-09-05 03:53:21,163-INFO: Loaded model from: ./weights/best_ckpt_infer
2023-09-05 03:53:25,687-INFO: Loaded model from: ./weights/best_ckpt_infer
2023-09-05 03:53:25,691-INFO: Selected strategies: ['qat_dis']
2023-09-05 03:53:28,010-INFO: Loaded model from: ./weights/best_ckpt_infer
2023-09-05 03:53:30,340-INFO: Loaded model from: ./weights/best_ckpt_infer
2023-09-05 03:53:32,443-INFO: Loaded model from: ./weights/best_ckpt_infer
Traceback (most recent call last):
File "run.py", line 148, in
产出模型用的paddle版本和使用自动压缩加载的paddle版本相同嘛?
试一下Paddle2.5和PaddeSlim2.5呢