1

I am new to pytorch. I am training an ANN for classification on the MNIST dataset.

train_loader = DataLoader(train_data,batch_size=200,shuffle=True)

I am confused. The dataset is of 60,000 images and I have set batch size of 6000 and my model has 30 epochs. Will every epoch see only 6000 images or will every epoch see 10 batches of 6000 images?

1 Answer 1

4

Every call to the dataset iterator will return batch of images of size batch_size. Hence you will have 10 batches until you exhaust all the 60000 images.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.