Well, as you can imagine if it gets NaN before entering the network it’s a problem related to the data preprocessing you are applying.
If you are normalizing between 0 and 1 you are probably dividing by the maximum value of the tensor.
As that value is zero you find 0/0=NaN