InterDigitalInc / CompressAI

A PyTorch library and evaluation platform for end-to-end compression research
https://interdigitalinc.github.io/CompressAI/
BSD 3-Clause Clear License
1.15k stars 228 forks source link

The default batch size is 10 times the input batch size #219

Closed battlepeace closed 1 year ago

battlepeace commented 1 year ago

Thank you for your work. I found the default batch size is 10 times the input batch size. Is this your setting, and what's the point of doing so? Where can I find it?

YodaEmbedding commented 1 year ago

What are you referring to by the "default batch size" and "input batch size"?

The examples/train.py specifies a training batch size of 16:

https://github.com/InterDigitalInc/CompressAI/blob/ee91d536bd934fc1f8b1532f78db4c94072ae26d/examples/train.py#L198-L200

The documentation states:

Models were trained with a batch size of 16 or 32

battlepeace commented 1 year ago

I mean, when I'm training, the batch size I specify is 16, but when I print out a file, it's 160 times. Is this your setting? image

YodaEmbedding commented 1 year ago

That's probably just the default interval for printing the progress bar.

https://github.com/tqdm/tqdm#documentation

The actual batch size is still 16, which you can check by printing out x.shape.

battlepeace commented 1 year ago

Thank you very much for your answer. I wish you a happy life and work