I’m sorry but I can’t really understand what is happening here. I would advise to to print the size of the data tensors along the way. Print it in the dataset, before the transform, after the transform, before going into the network and you’ll see where it messes up