data.DataLoader(mnist_train,batch_size=18)
时间: 2024-05-19 11:14:03 浏览: 137
MNIST_train数据集下载()
This creates a DataLoader object that iterates over the MNIST training set in batches of 18 samples. The DataLoader object is used to create mini-batches of data that can be fed into a neural network for training. Each batch will have 18 images and their corresponding labels. By iterating over the DataLoader object, we can access each batch of data in turn and use it to update the weights of the neural network.
阅读全文