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

SGD with mini-batches #1707

Open
MargaretDuff opened this issue Feb 14, 2024 · 1 comment
Open

SGD with mini-batches #1707

MargaretDuff opened this issue Feb 14, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@MargaretDuff
Copy link
Member

We want to be able to do completely random mini-batch stochastic gradient descent ( or maybe other flavours...)

We could consider something like:
https://github.com/epapoutsellis/StochasticCIL/blob/b177e46dfb22c5305f52b6d61f16f42e03ddb2f0/Wrappers/Python/cil/optimisation/functions/SGFunction.py#L61

Example usage:

rs = RandomSampling.uniform(len(f_subsets), batch_size=5) 

F = SGFunction(f_subsets, selection=rs)
proxSGD = ISTA(initial = initial, f=F, g=G, 
            update_objective_interval = rs.num_batches, 
            max_iteration = num_epochs*rs.num_batches)
proxSGD.run(verbose=1)

Points to consider

  • Is this part of the currently proposed ApproximateGradientSumFunction or a different class, perhaps a more general class
  • We would need to think carefully about how to adjust the stepsize (wrt Lipschitz constant and batch size)
  • We would also need to consider data passes ]

Discussed with @zeljkozeljko

@MargaretDuff MargaretDuff added the enhancement New feature or request label Feb 14, 2024
@MargaretDuff MargaretDuff self-assigned this Feb 14, 2024
@MargaretDuff MargaretDuff moved this from ToDo to On hold/blocked in Work plan Feb 14, 2024
@epapoutsellis
Copy link
Contributor

Please check also #1345 (comment)
Walnut comparison for TV recon using SGD and MB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: On hold/blocked
Development

No branches or pull requests

2 participants