Your recommendation raise runtime error like this:

Traceback (most recent call last):
File “new_main_grid16_v2.py”, line 222, in 
mlp_train_dataset = torch.utils.data.TensorDataset(mlp_train_inputs.data, mlp_train_targets.data)
File “/home/mhha/.conda/envs/pytorchmh/lib/python3.5/site-packages/torch/tensor.py”, line 374, in data
raise RuntimeError('cannot call .data on a torch.Tensor: did you intend to use autograd.