Federated-Learning-PyTorch icon indicating copy to clipboard operation
Federated-Learning-PyTorch copied to clipboard

Loss: nan WARNING:root:NaN or Inf found in input tensor. WARNING:root:NaN or Inf found in input tensor.

Open TatShri opened this issue 4 years ago • 3 comments

TatShri avatar Jun 07 '21 16:06 TatShri

Same issue. Anyone knows why?

rui-ye avatar Nov 11 '21 13:11 rui-ye

I believe this issue is because NLLLoss is used but log_softmax is not used in some of the models. i.e. add F.log_softmax(out, dim=1) to CNNFashion_Mnist.

wyxzou avatar Jan 20 '22 06:01 wyxzou

You're right. Thank you bro.

Asomey avatar Jun 09 '23 13:06 Asomey