Solved by user_123454321 in post #2 
              
              
                Maybe you need to convert the images to float32…can you replace 
        tensor_x = torch.from_numpy(np.array(images))

with 
        tensor_x = torch.from_numpy(np.array(images)).float()