Function tc_tensor::broadcast_shape

source ·
pub fn broadcast_shape(left: &[u64], right: &[u64]) -> TCResult<Shape>
Expand description

Compute the shape returned by broadcasting the given shapes together.

For rules of broadcasting, see: https://pytorch.org/docs/stable/notes/broadcasting.html