Function tch_utils::ops_2d::norm_2d

source ·
pub fn norm_2d(t: &Tensor) -> Tensor
Expand description

Compute the norm of vectors in 2d pictures. Equivalent to linalg_norm but faster.

Arguments

  • t: Tensor - The tensor to compute the norm [N, C, H, W]

Returns

Tensor - The norm of the vectors [N, 1, H, W]