mindchemistry.e3.o3.Norm
- class mindchemistry.e3.o3.Norm(irreps_in, squared=False, dtype=float32, ncon_dtype=float32)[source]
- Norm of each irrep in a direct sum of irreps. - Parameters
- irreps_in (Union[str, Irrep, Irreps]) – Irreps for the input. 
- squared (bool) – whether to return the squared norm. Default: False. 
- dtype (mindspore.dtype) – The type of input tensor. Default: - mindspore.float32.
- ncon_dtype (mindspore.dtype) – The type of input tensors of ncon computation module. Default: - mindspore.float32.
 
 - Inputs:
- v (Tensor) - The shape of Tensor is \((..., irreps\_in.dim)\) . 
 
- Outputs:
- output (Tensor) - The shape of Tensor is \((..., irreps\_out.dim)\) . 
 
- Supported Platforms:
- Ascend
 - Examples - >>> import mindspore as ms >>> import numpy as np >>> from mindchemistry.e3.o3 import Norm >>> n = Norm('3x1o') >>> v = ms.Tensor(np.linspace(1., 2., n.irreps_in.dim), dtype=ms.float32) >>> n(v).shape (1, 3)