torch.nn.functional.hardtanh¶ torch.nn.functional.hardtanh(input, min_val=-1., max_val=1., inplace=False) → Tensor[source][source]¶ 逐元素地应用 HardTanh 函数。 有关更多详细信息,请参见 Hardtanh。 返回类型 Tensor