Skip to main content

elementwise

Function elementwise 

Source
pub fn elementwise(
    cx: &mut dyn BatchCx,
    prim: Prim,
    inputs: &[Batched],
    params: &Params,
) -> Result<Vec<Batched>>
Expand description

The batching rule of elementwise primitives, whose operands have the same shape: operands batched at the same dimension are used as they are; otherwise every operand is moved (or broadcast) to have its batch dimension first.

ยงErrors

Returns an error from the primitive.