Home > Net >  pytorch, for the cross_entropy function, What if the input labels are all ignore_index?
pytorch, for the cross_entropy function, What if the input labels are all ignore_index?

Time:08-08

for the nn.CrossEntropyLoss(), What if the input labels are all ignore_index ? I got a 'nan' loss, how to fix it ? thanks!

detail of my code is following: enter image description here

  • Related