torch.rand

J·2021년 6월 18일
0

pytorch

목록 보기
15/23

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.

[0,1) 사이의 값을 가지는 uniform distibution으로부터 argument에 맞는 개수의 random number를 뽑아서 tensor를 반환한다.

size (int...) – a sequence of integers defining the shape of the output tensor. Can be a variable number of arguments or a collection like a list or tuple.

'size'는 output tensor의 shape을 결정한는 integers의 sequence이다. argument개수가 달라질 수 있고, list나 tuple같은 collection일 수도 있다.

profile
I'm interested in processing video&images with deeplearning and solving problem in our lives.

0개의 댓글