Just keep in mind that creating a torch.FloatTensor out of Numpy’s float64 array will be very slow. It’s better to use torch.from_numpy(arr).float(). The .float() call will be a no-op if the array is already of float32 type.