yolov3-network-slimming
yolov3-network-slimming copied to clipboard
train过程中w和h变得很大
训练过程中出现了下图这样的问题: [Epoch 0/2000, Batch 114/117264] [Losses: x 0.567772, y 0.612249, w 25922512289561715933184.000000, h 142289888154081864712192.000000, conf 45.791771, cls 12.687886, total 168212400443643580645376.000000, recall: 0.00000, precision: 0.00000]
同时报错如下:
Traceback (most recent call last):
File "sparsity_train.py", line 154, in
File "/home/volcano/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/home/volcano/anaconda3/lib/python3.7/site-packages/torch/nn/modules/loss.py", line 498, in forward
return F.binary_cross_entropy(input, target, weight=self.weight, reduction=self.reduction)
File "/home/volcano/anaconda3/lib/python3.7/site-packages/torch/nn/functional.py", line 2051, in binary_cross_entropy
input, target, weight, reduction_enum)
RuntimeError: Assertion `x >= 0. && x <= 1.' failed. input value should be between 0~1, but got nan at /opt/conda/conda-bld/pytorch_1565272271120/work/aten/src/THNN/generic/BCECriterion.c:62
有人知道如何解决吗?感谢!