sicara / easy-few-shot-learning

Ready-to-use code and tutorial notebooks to boost your way into few-shot learning for image classification.
MIT License
1.03k stars 141 forks source link

Size of the batches: classical training. #145

Closed vsantjr closed 5 months ago

vsantjr commented 5 months ago

Problem To know precisely the size of the batches in the Classical Training notebook.

How can we help This is just to be sure. In the Classical Training notebook we have:

batch_size = 128
n_way = 5
n_shot = 5
n_query = 10
n_validation_tasks = 500 
n_test_tasks = 1000

During the training phase, considering the training set (train_loader), the batch size is 128 images. But during the validation step, considering the validation set (val_loader), each batch represents a task and since we have a total of n_way (n_shot + n_query) images in each batch, then the batch size here is 5(5+10) = 75 images. And we have a total of 500 tasks (batches) related to this validation step.

As for this test set (test_loader), there are 1,000 tasks (batches) with 75 images each.

Right?

Thank you.

ebennequin commented 5 months ago

Yes this is exactly it!

vsantjr commented 5 months ago

Thank you @ebennequin.