Why can't denormalize() take LongTensor() as it's input

I had this error, and it seems like only FloatTensors are expected in this func. Is there any specific reason why LongTensors are not expected ?

When you normalize you usually want to the values to be between 0 or -1 and 1. Using an int data type for that does not really make sense as you would just cover the bounds (0 or -1 and 1) and nothing in between.

To farmiliarize yourself with the data types, have a look here and at the numpy data types page.

Thanks