Skip to main content

apply_binary_elementwise

Function apply_binary_elementwise 

Source
pub fn apply_binary_elementwise<F>(
    a: &Tensor,
    b: &Tensor,
    operation: F,
    _context: &str,
) -> Result<Tensor>
where F: Fn(f32, f32) -> f32,
Expand description

Common pattern for element-wise tensor operations with broadcasting