I am used to using numpy arrays in the form X,y and fitting a model to those.  I can’t understand what Datasets and Dataloaders do to the X and y vectors.  I have searched on the internet a fair amount and I still cannot figure out what those functions do.
I am hoping someone on here can give me a simple quick explanation of what these functions do and are for.  Here’s an example of where how I use these functions:
trainset = torch.utils.data.TensorDataset(X_train, y_train)
trainloader = torch.utils.data.DataLoader(trainset, batch_size=128, shuffle=True, drop_last=True)
Why do I do these to load data into a Neural Network, instead of just using X_train, y_train?