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

(pytorch) pytorch random

 (pytorch)  pytorch random

가끔씩 까먹을 때가 있어서 정리해둡니다ㅎㅎ torch.rand(n) torch.rand — PyTorch 1.11.0 documentation torch.rand torch. rand ( *size , * , out=None , dtype=None , layout=torch.strided , device=None , requires_grad=False ) → Tensor Returns a tensor filled with random numbers from a uniform distribution on the interval [0, 1) [ 0 , 1 ) The shape of the tensor is defined by the variable argument size .... pytorch.org 0 ~ 1 사이의 숫자를 n개 생산하는 메소드 >>> torch.rand(4) tensor([ 0.5204, 0.2503, 0.3525, 0.5673]) >>> torch.rand(2, ...