Skip to content

Conversation

fzngagan
Copy link

@fzngagan fzngagan commented Aug 3, 2025

On this point of the L7 of Practical Deep Learning for Coders, you've explained that we pass the effective batch size to the constructor of the GradientAccumulation class. But the comment in the notebook doesn't match that fact and got a bit confusing to figure out what's the case actually.

https://github.com/fastai/fastai/blob/1ac4ee147baf86d2f66f13da9d755a4970f1160b/nbs/18a_callback.training.ipynb#L225-230

confirms this is the case.

On [this point](https://youtu.be/p4ZZq0736Po?t=1104) of the L7 of Practical Deep Learning for Coders, you've explained that we pass the effective batch size to the constructor of the `GradientAccumulation` class. But the comment in the notebook doesn't match that fact and got a bit confusing to figure out what's the case actually.
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@fzngagan
Copy link
Author

fzngagan commented Aug 3, 2025

Also, confirmed that directly passing a value in the constructor correctly sets it in the n_acc class member:

Screenshot 2025-08-03 at 3 18 16 PM

So its ok to pass the param directly or as n_acc=64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant