xma.functional.p_norm¶
- p_norm(x: Tensor, multiplier: float | None = None, p: int | str = 2, output_dtype: dtype = torch.float32, *, kernel_backend: KernelBackend | None = None) Tensor[source]¶
computes norm of a vector
- Parameters:
x (torch.Tensor) – input activation
multiplier (float | None) – if not None, pre-multiplies x with multiplier. Defaults to None.
p (int | str) – norm type. can be integer >= 1 or inf
output_dtype (torch.dtype) – output dtype
kernel_backend (KernelBackend | None) – KernelBackend
- Returns:
output activation
- Return type:
Tensor