Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include batch_size as an argument, instead of sample_rate #473

Closed
wants to merge 1 commit into from
Closed

Include batch_size as an argument, instead of sample_rate #473

wants to merge 1 commit into from

Conversation

ashkan-software
Copy link
Contributor

Summary:
Other examples in Opacus follow this logic for arguments related to batch size:

  • batch_size and batch_size_test

CIFAR-10 still uses the sample_rate * len(train_data).

This diff updates that, to aslo make it clearer (someone was confused here)

Differential Revision: D38799564

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Aug 17, 2022
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D38799564

Copy link
Contributor

@ffuuugor ffuuugor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Summary:
Pull Request resolved: #473

Other examples in Opacus follow this logic for arguments related to batch size:
- batch_size and batch_size_test

CIFAR-10 still uses the `sample_rate * len(train_data)`.

This diff updates that, to aslo make it clearer (someone was confused [here](https://discuss.pytorch.org/t/the-opacus-example-train-batch-size-vs-sampling-rate/158771))

Reviewed By: ffuuugor

Differential Revision: D38799564

fbshipit-source-id: 51035caada49c90ee95aec51e75e66837eec4338
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D38799564

metavar="SR",
help="sample rate used for batch construction (default: 0.005)",
metavar="N",
help="train bacth size",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be change this to approximate batch size in the help string, since the batch size will not necessarily be 2K.

@ashkan-software ashkan-software closed this by deleting the head repository Aug 25, 2022
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D38799564

@ffuuugor ffuuugor added this to the 1.2.0 milestone Aug 26, 2022
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D38799564

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D38799564

facebook-github-bot pushed a commit that referenced this pull request Sep 8, 2022
Summary:
Fixing a bug introduced in #473

Pull Request resolved: #496

Reviewed By: ffuuugor

Differential Revision: D39263716

Pulled By: alexandresablayrolles

fbshipit-source-id: ebc387fb5ef140cd35a9b2c69b6d03af20d507f7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants