flat_draw#
- t3toolbox.backend.optimizers.flat_draw(problem, batch)#
def flat_draw( problem: Problem, batch: int, # measurements per minibatch ) -> typ.Callable: # draw(rng) -> (sample_B, data_B)
The default minibatch draw: a uniform random subset of
batchmeasurements across the whole (flattened) sample stackW– the robust default. Returns adraw(rng) -> (sample_B, data_B)overproblem’s full data, via the kind’stake. A user may pass anydrawinstead (slice X / P / order, importance-sample, …). Host numpy by default; pass jax data + a jax draw to keep the minibatch on device (the optimizer never compiles the draw – only the per-step kernel).- Parameters:
problem (Problem)
batch (int)
- Return type:
t3toolbox.backend.common.typ.Callable