Fp32LayerNorm¶ class torchtune.modules.Fp32LayerNorm(*args: Any, **kwargs: Any)[source]¶ 围绕LayerNorm的包装器,以支持混合精度训练。 forward(x: Tensor) → Tensor[source]¶ Parameters: x (torch.Tensor) – 输入张量。 Returns: 归一化的输出张量,其形状与x相同。 Return type: torch.Tensor