Hi, If you convert your float tensor to long tensor (I assume you’re storing values between 0.0 and 1.0 in your float tensor) all your values get rounded off (in your example to 0, what’s the reason for the plot being black only). To solve this, you could multiply your original float tensor with a appropriate value before converting it to long.
imshow() also has the vmin and vmax parameters to specify the range, however by default it takes the range of values of the given data, so that should work anyways.
Regrads.