torch.nn.functional.leaky_relu torch.nn.functional.leaky_relu(input, negative_slope=0.01, inplace=False) → Tensor[源代码] 逐元素应用公式:$\text{LeakyReLU}(x) = \max(0, x) + \text{negative\_slope} * \min(0, x)$ 更多详情请参见LeakyReLU。 返回类型 Tensor