I’m a beginner and just started learning pytorch.I saw that from Kaggle Kernel , the usage of TensorDataset . but i couldn’t understand what exactly it does.
The description states : indexing tensors along dimensions
but i have no clue what does this mean , Can anyone please explain?
Sort of. But you must have the dimension 0 of every tensor same. And it does not merge the tensors, it just allows you to use data[0] to index all the tensors at the same time. So you still need a tuple to access the elements of the tensors.
In the above example, you can see data[0] returns two tensors as a tuple. The first tensor is from x[0] and the second tensor is from y[0]