로딩
요청 처리 중입니다...

(pytorch) torch.clamp

 (pytorch) torch.clamp

torch.clamp torch.clamp — PyTorch 1.12 documentation torch.clamp torch. clamp ( input , min = None , max = None , * , out = None ) → Tensor Clamps all elements in input into the range [ min , max ] . Letting min_value and max_value be min and max , respectively, this returns: y_i = \min(\max(x_i, \text{min\_value}_i), \text{max\_value}_i) y i = min ... pytorch.org 첫 번째 파라미터인 input tensor의 최대값과 최소값을 제한하는 메소드이다. import torch a = torch.FloatTensor([1, 2, 3, 4, 5, 6]) # tensor([1., 2., 3., 4., 5., 6...

원문 링크 : (pytorch) torch.clamp