keras/src/backend/tensorflow/random.py/binomial
def binomial(shape, counts, probabilities, dtype=None, seed=None):
    dtype = dtype or floatx()
    seed = _cast_seed(draw_seed(seed))
    # TODO: `tf.random.stateless_binomial` doesn't support bfloat16
    intemediate_dtype = dtype
    if standardize_dtype(dtype) == "bfloat16":
        intemediate_dtype = "float32"
    return tf.cast(
        tf.random.stateless_binomial(
            shape=shape,
            seed=seed,
            counts=counts,
            probs=probabilities,
            output_dtype=intemediate_dtype,
        ),
        dtype,
    )