Create a mask for missing data to exclude Nan (missing data) from the loss function computation.
Create a mask for missing data to exclude Nan (missing data) from the loss function computation.