MareArts blog / Computer Vision & Artificial Intelligent Systems
torch.nan_to_num
This is for 1.8 version.
so use it instead of this.
temp[torch.isnan(temp)] = 0
temp is tensor