Solved by colesbury in post #2 
              
              
                You won’t lose any precision converting to float. The 32-bit floating point type can precisely represent all integers all 16-bit integers (actually up to all 24-bit integers too). 
You should probably use float instead of double. Most PyTorch operations are faster on float32 and on GPUs float operat…