Solved by bsridatta in post #2 
              
              
                You dont want to mix inputs and labels into the same tensor, it doesnt make sense to merge them. Instead create a dataset, have separate tensors self.inputs, self.labels in the datasets __init__ and In the __getitem__(idx), just return self.inputs[idx], self.labels[idx]