hitfeelee / Yolo3D

perform 3D object detection base on Yolov5 and 3DDeepbox
MIT License
31 stars 6 forks source link

RuntimeError: a view of a leaf Variable that requires grad is being used in an in-place operation. #7

Closed LionGx closed 2 years ago

LionGx commented 2 years ago

I got this error when training,what should i do? Thank you so much.

python train.py --data ./datasets/configs/kitti.yaml --cfg models/configs/yolo3d_5m.yaml --weights ./weights/yolov5m.pt --batch-size 64 --epochs 2000 --is-rect --is-mosaic --multi-scale --resume

Traceback (most recent call last): File "train.py", line 299, in train(cfg) File "train.py", line 97, in train model = Model(config).to(device) File "E:\download\Yolo3D-main\models\yolo.py", line 66, in init self.model, self.save = parse_model(self.md, ch=[ch]) # model, savelist, ch_out File "E:\download\Yolo3D-main\models\yolo.py", line 50, in parsemodel m = nn.Sequential([m(args) for _ in range(n)]) if n > 1 else m(*args) # module File "E:\download\Yolo3D-main\models\yolo.py", line 120, in init self._initialize_biases() File "E:\download\Yolo3D-main\models\yolo.py", line 184, in _initialize_biases b[:, 4] += math.log(8 / (640 / si) ** 2) # obj (8 objects per 640 image) RuntimeError: a view of a leaf Variable that requires grad is being used in an in-place operation.