Doubt in TensorDataset and DataLoader

What is the difference between TensorDataset and DataLoader ? According to me, using only DataLoader should work fine. Please explain.

for what i know :
as you mentioned DataLoader could work fine ,cuz it’s a Generic function (high level function) that can handle data more efficient, like you can specify the batch size in DataLoader but not TensorDataset ,shuffle the data and other parameter that manage your data overall

torch.utils.data.Dataset=>An abstract class for representing a dataset.
torch.utils.data.DataLoader=>Wraps a dataset and provides access to the underlying data.
mainly DataLoader you specify the batch size and shuffle argument ,other parameters for advanced Usage…to warp up Dataset for the data itself DataLoader for manage loading data to the model