qp.labs.phox.training_iterator¶
- training_iterator(optimizer, loss, stepsize, loss_kwargs, options=None)[source]¶
Generator that yields training results in batches of size ‘unroll_steps’.
- Parameters:
optimizer (str) – Name of the optimizer to use. Options are “GradientDescent”, “Adam”, or “BFGS”.
loss (Callable) – The loss function.
stepsize (float) – The learning rate.
loss_kwargs (dict[str, Any]) – Arguments to pass to the loss function.
options (TrainingOptions | None) – Configuration options for training. See
TrainingOptionsfor further details.
- Yields:
Iterator[BatchResult] – An iterator over batch results. See
BatchResultfor further details.