在yolov3运行过程中遇到的困难

在pychram上运行pytorch的yolov3,程序报错,查了很久都没有找到解决方法
报错如下:

Traceback (most recent call last):
  File "E:\Anaconda\Test2-YOLOv3\yolov3-9.5.0\train.py", line 543, in <module>
    train(hyp, opt, device, tb_writer)
  File "E:\Anaconda\Test2-YOLOv3\yolov3-9.5.0\train.py", line 304, in train
    loss, loss_items = compute_loss(pred, targets.to(device))  # loss scaled by batch_size
  File "E:\Anaconda\Test2-YOLOv3\yolov3-9.5.0\utils\loss.py", line 117, in __call__
    tcls, tbox, indices, anchors = self.build_targets(p, targets)  # targets
  File "E:\Anaconda\Test2-YOLOv3\yolov3-9.5.0\utils\loss.py", line 197, in build_targets
    offsets = (torch.zeros_like(gxy)[None] + off[:, None])[j]
IndexError: The shape of the mask [5, 14] at index 0 does not match the shape of the indexed tensor [1, 14, 2] at index 0

希望各位可以给予帮助

文章:YoloV3运行自己的数据集(详细) 中也许有你想要的答案,请看下吧

这时矩阵维度不一致的问题,你检查一下相关的代码