microsoft / BatteryML

MIT License
497 stars 107 forks source link

Batch size setting #26

Closed Tian042000 closed 9 months ago

Tian042000 commented 9 months ago

Dear developers,

Thank you for providing this extensive toolbox. I am wondering where can I modify the setting of batch size? I can't find it in your paper or the code.

Best wishes, Tian

agiamason commented 9 months ago

Hi Tian, Thank you for your question and suggestion. For non-neural network models, we do not set a batch size; all training data is learned all at once. For neural network models, the setting for batch size can be found in the fit and predict functions of the _batteryml/models/nnmodel.py file, which both call DataLoader. Currently, you can modify the batch size you want to set in DataLoader. Currently, the default batch size is set to the size of the training/testing dataset. We will also consider adding batch size as a configurable item in the config file.