• R
    reylax

    [Error] Traceback (most recent call last):
    File "train.py", line 226, in train
    cls_loss, reg_loss = model(imgs, annot, obj_list=params.obj_list)
    File "/home/leixiaotang/anaconda3/envs/yolo3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
    result = self.forward(*input, **kwargs)
    File "/home/leixiaotang/anaconda3/envs/yolo3/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 148, in forward
    inputs, kwargs = self.scatter(inputs, kwargs, self.device_ids)
    File "/home/leixiaotang/efficiendet/Yet-Another-EfficientDet-Pytorch/utils/utils.py", line 206, in scatter
    for device_idx in range(len(devices))], [kwargs] * len(devices)
    File "/home/leixiaotang/efficiendet/Yet-Another-EfficientDet-Pytorch/utils/utils.py", line 206, in
    for device_idx in range(len(devices))], [kwargs] * len(devices)
    RuntimeError: Source tensor must be contiguous.

    这一段不晓得哪里错了
    return [(inputs[0][splits * device_idx: splits * (device_idx + 1)].to(f'cuda:{device_idx}', non_blocking=True),
    inputs[1][splits * device_idx: splits * (device_idx + 1)].to(f'cuda:{device_idx}', non_blocking=True))
    for device_idx in range(len(devices))], [kwargs] * len(devices)

    发布在 社区求助区(SOS!!) 阅读更多

与 ManaAI社区 的连接断开,我们正在尝试重连,请耐心等待