print(self.test_dataset.test_data[0].type()) is also a ByteTensor. I use a temporary solution by manually converting into FloatTensor however there was no problem with this snippet before as far as I remember(maybe before 0.4.1, I am not sure unfortunately).