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 batch measurements across the whole (flattened) sample stack W – the robust default. Returns a draw(rng) -> (sample_B, data_B) over problem’s full data, via the kind’s take. A user may pass any draw instead (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:
Return type:

t3toolbox.backend.common.typ.Callable