mindscience.e3nn.o3.LinearBias
- class mindscience.e3nn.o3.LinearBias(irreps_in, irreps_out, has_bias, ncon_dtype=mindspore.float32, **kwargs)[源代码]
具有添加偏置选项的线性等变操作。 等效于 TensorProduct 的 instructions='linear',并可选择添加偏置。详细信息请参见
mindscience.e3nn.o3.TensorProduct。- 参数:
irreps_in (Union[str, Irrep, Irreps]) - 输入的Irreps。
irreps_out (Union[str, Irrep, Irreps]) - 输出的Irreps。
has_bias (bool) - 是否将偏差添加到计算中。
ncon_dtype (mindspore.dtype, 可选) - ncon 计算模块输入张量的类型。默认值:
mindspore.float32。
- 输入:
v1 (Tensor) - 输入张量,形状为 \((..., 2l+1)\)。
v2 (Tensor, 可选) - 输入张量,形状为 \((..., 2l+1)\)。默认值:
None。weight (Tensor, 可选) - 权重张量,形状为 \((..., 2l+1)\)。默认值:
None。
- 输出:
out (Tensor) - 输出张量,形状为 \((..., 2l+1)\)。
样例:
>>> from mindscience.e3nn.o3 import LinearBias >>> LinearBias('2x2e+3x1o+3x0e', '3x2e+5x1o+2x0e') TensorProduct [linear] (2x2e+3x1o+3x0e x 1x0e -> 3x2e+5x1o+2x0e)