这代码可以正常训练?为什么我的报错误呢?
Traceback (most recent call last):
File "/media/data/liuben/optimize/yolov3-network-slimming/sparsity_train.py", line 164, in
train()
File "/media/data/liuben/optimize/yolov3-network-slimming/sparsity_train.py", line 110, in train
loss = model(imgs, targets)
File "/home/teamway/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, kwargs)
File "/media/data/liuben/optimize/yolov3-network-slimming/yolomodel.py", line 353, in forward
x, losses = self.module_list[i][0](x, targets)
File "/home/teamway/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(input, kwargs)
File "/media/data/liuben/optimize/yolov3-network-slimming/yolomodel.py", line 107, in forward
precision = float(nCorrect / nProposals)
ZeroDivisionError: division by zero
这代码可以正常训练?为什么我的报错误呢? Traceback (most recent call last): File "/media/data/liuben/optimize/yolov3-network-slimming/sparsity_train.py", line 164, in
train()
File "/media/data/liuben/optimize/yolov3-network-slimming/sparsity_train.py", line 110, in train
loss = model(imgs, targets)
File "/home/teamway/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, kwargs)
File "/media/data/liuben/optimize/yolov3-network-slimming/yolomodel.py", line 353, in forward
x, losses = self.module_list[i][0](x, targets)
File "/home/teamway/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(input, kwargs)
File "/media/data/liuben/optimize/yolov3-network-slimming/yolomodel.py", line 107, in forward
precision = float(nCorrect / nProposals)
ZeroDivisionError: division by zero