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

please add some comments on these lines #1

Open
yorkerlin opened this issue Aug 24, 2018 · 1 comment
Open

please add some comments on these lines #1

yorkerlin opened this issue Aug 24, 2018 · 1 comment

Comments

@yorkerlin
Copy link
Collaborator

yorkerlin commented Aug 24, 2018

for s in range(self.num_samples):

See also:

loss = closure()

Make sure that the same mini-batch should be used here.
One way to achieve that is to use state['step'] as the seed of the random number generator for generating mini-batches. I did that in my Autograd implementation

@yorkerlin
Copy link
Collaborator Author

yorkerlin commented Aug 24, 2018

It will be nice to point out that the loss function in

loss = closure()
computes the mean (instead of the sum) of the loss over data points in one mini-batch.

@yorkerlin yorkerlin changed the title please add some comments on this line please add some comments on these lines Aug 25, 2018
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

No branches or pull requests

1 participant