CCPD icon indicating copy to clipboard operation
CCPD copied to clipboard

when training rpnet, division by zero

Open Doylegyf opened this issue 5 years ago • 4 comments

Traceback (most recent call last): File "rpnet.py", line 405, in model_conv = train_model(model_conv, criterion, optimizer_conv, num_epochs=epochs) File "rpnet.py", line 395, in train_model print ('%s %s %s\n' % (epoch, sum(lossAver) / len(lossAver), time()-start)) ZeroDivisionError: division by zero

It seems lossAver=0.Has anyone encountered such a problem?

Doylegyf avatar Apr 19 '19 13:04 Doylegyf

Maybe it is because the wr2 network training is not good enough?

Doylegyf avatar Apr 19 '19 14:04 Doylegyf

The reason is loss.data[0],I changed it to loss.item()

Doylegyf avatar Apr 19 '19 14:04 Doylegyf

Yes,you are right,just because of the torch version

zhqx511 avatar May 06 '19 03:05 zhqx511

Same problem. Seems wR2 doesn't own 'model' attribute? Have you solved the problem?

Yifanzhou-0713 avatar May 20 '21 10:05 Yifanzhou-0713