Open wade0604 opened 8 months ago
loss = loss.sum([1,2,3,4])/masks.sum([1,2,3,4]) if masks.sum([1,2,3,4]) contains 0, then the loss will be NaN so i simply change the upper code to loss = loss.sum([1,2,3,4])/(masks.sum([1,2,3,4])+1e-6), Is this appropriate?
loss = loss.sum([1,2,3,4])/masks.sum([1,2,3,4])
loss = loss.sum([1,2,3,4])/(masks.sum([1,2,3,4])+1e-6)
loss = loss.sum([1,2,3,4])/masks.sum([1,2,3,4])
if masks.sum([1,2,3,4]) contains 0, then the loss will be NaN so i simply change the upper code toloss = loss.sum([1,2,3,4])/(masks.sum([1,2,3,4])+1e-6)
, Is this appropriate?