8000 Problem with training YOLOv2 · Issue #60 · andy-yun/pytorch-0.4-yolov3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Problem with training YOLOv2 #60
Open
@mrkieumy

Description

@mrkieumy

Hi @andy-yun
I trained normally with yoloV3, tinyV3, tinyV2. But with YoloV2 model, it raises this error:

Traceback (most recent call last):
File "train.py", line 626, in
main()
File "train.py", line 202, in main
nsamples = train(epoch)
File "train.py", line 307, in train
ol=l(output[i]['x'], target)
File "/home/kieumy/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/home/kieumy/YOLO/pytorch_conditioning/region_layer.py", line 172, in forward
loss_cls = self.class_scale * nn.CrossEntropyLoss(reduction='sum')(cls, tcls)/nB
File "/home/kieumy/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/home/kieumy/anaconda3/lib/python3.6/site-packages/torch/nn/modules/loss.py", line 904, in forward
ignore_index=self.ignore_index, reduction=self.reduction)
File "/home/kieumy/anaconda3/lib/python3.6/site-packages/torch/nn/functional.py", line 1970, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File "/home/kieumy/anaconda3/lib/python3.6/site-packages/torch/nn/functional.py", line 1790, in nll_loss
ret = torch._C._nn.nll_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
RuntimeError: invalid argument 2: non-empty vector or matrix expected at /pytorch/aten/src/THCUNN/generic/ClassNLLCriterion.cu:32

Do you know the reason why?
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0