torch.nn.functional.hardtanh_¶ torch.nn.functional.hardtanh_(input, min_val=-1., max_val=1.) → Tensor¶ 是 hardtanh() 的原地 (in-place) 版本。