Rate this Page

torch.nn.functional.hardtanh#

torch.nn.functional.hardtanh(input,min_val=-1.,max_val=1.,inplace=False)Tensor[source]#

Applies the HardTanh function element-wise. SeeHardtanh for moredetails.

Return type

Tensor