Pytorch-CapsuleNet icon indicating copy to clipboard operation
Pytorch-CapsuleNet copied to clipboard

After a few Epochs, Loss Would Be NaN

Open AzadeAlizade opened this issue 3 years ago • 3 comments
trafficstars

Hello, I tried to test your code but after a few epochs (8 at most) the loss of the network turns out to be NaN. Has anyone else faced this issue while testing? How can I fix it Untitled-1 ?

AzadeAlizade avatar Dec 19 '21 14:12 AzadeAlizade

Is the problem solved?

jindongwang avatar Apr 15 '22 05:04 jindongwang

I have the same problem

Marblegee avatar Aug 03 '22 01:08 Marblegee

I have solved this problem by using the torch.norm instead of using sqrt in the squash function

Z4HRA-S avatar Dec 12 '22 17:12 Z4HRA-S