torch.nn.functional.hardtanh¶ torch.nn.functional.hardtanh(input, min_val=-1., max_val=1., inplace=False) → 張量[source][source]¶ 按元素應用 HardTanh 函式。有關更多詳細資訊,請參閱 Hardtanh。 返回型別 張量