반응형
In [1]:
import torch
torch.Size([14]) 실 데이터 확인¶
In [2]:
torch.rand(14)
Out[2]:
tensor([0.3614, 0.6932, 0.3986, 0.0717, 0.4612, 0.3320, 0.3733, 0.9937, 0.1960, 0.5579, 0.0481, 0.1131, 0.4117, 0.0707])
torch.Size([14, 1]) 실데이터 확인¶
In [3]:
torch.rand(14,1)
Out[3]:
tensor([[0.3119], [0.2978], [0.8179], [0.8675], [0.2603], [0.6444], [0.9550], [0.8595], [0.9938], [0.8488], [0.9781], [0.2936], [0.7469], [0.1528]])
torch.Size([5, 5, 3]) 실데이터 확인¶
In [4]:
torch.rand(5, 5, 3)
Out[4]:
tensor([[[8.1093e-01, 9.7126e-02, 9.3603e-01], [7.3595e-01, 7.9042e-01, 6.6797e-01], [5.1949e-01, 2.4500e-01, 4.2269e-01], [3.1705e-01, 1.2644e-01, 4.6826e-01], [8.0535e-01, 9.4919e-01, 2.3403e-02]], [[9.5550e-01, 4.2564e-01, 1.5953e-01], [3.7580e-01, 2.0450e-01, 2.7670e-01], [5.4128e-02, 4.1844e-02, 2.2652e-01], [8.5748e-01, 5.8308e-01, 8.3461e-01], [1.2237e-04, 8.7648e-01, 5.6138e-01]], [[3.0570e-01, 4.7267e-01, 4.4261e-01], [6.8536e-01, 4.8119e-01, 1.2296e-01], [8.7767e-01, 2.4545e-01, 2.3783e-01], [6.7404e-01, 5.9922e-02, 2.7875e-01], [2.4323e-02, 6.4168e-01, 7.3504e-01]], [[2.4532e-01, 3.1692e-01, 5.4505e-01], [4.7487e-01, 8.4769e-01, 1.4781e-01], [4.1314e-01, 1.3847e-02, 4.9605e-01], [5.6771e-01, 4.9635e-02, 7.4852e-01], [5.6551e-01, 7.3074e-01, 8.7576e-01]], [[1.5303e-01, 7.5480e-02, 7.8673e-01], [6.3709e-01, 8.8926e-01, 3.1974e-01], [3.8597e-01, 2.7037e-04, 3.1470e-01], [8.8563e-01, 8.6744e-01, 7.8202e-02], [9.0357e-01, 8.1042e-01, 4.5860e-02]]])
torch.Size([3, 5, 5]) 실데이터 확인¶
In [5]:
torch.rand(3, 5, 5)
Out[5]:
tensor([[[0.5787, 0.5831, 0.0852, 0.1923, 0.7381], [0.0622, 0.7419, 0.0408, 0.4340, 0.6978], [0.0143, 0.5743, 0.1922, 0.9338, 0.1362], [0.5289, 0.8909, 0.4887, 0.1208, 0.7412], [0.7874, 0.5140, 0.8687, 0.4495, 0.1388]], [[0.0841, 0.3029, 0.4871, 0.8804, 0.2345], [0.8506, 0.4351, 0.8287, 0.1885, 0.6310], [0.5359, 0.9356, 0.4166, 0.4578, 0.0306], [0.6636, 0.9475, 0.5979, 0.6575, 0.0916], [0.7969, 0.8815, 0.9166, 0.7793, 0.4896]], [[0.4555, 0.5561, 0.9884, 0.9438, 0.0948], [0.6261, 0.6597, 0.2378, 0.6132, 0.3853], [0.7098, 0.2472, 0.7483, 0.0523, 0.4432], [0.1618, 0.1251, 0.8504, 0.3967, 0.5782], [0.3876, 0.8597, 0.4352, 0.0024, 0.0241]]])
반응형
'python' 카테고리의 다른 글
파이토치 최대값, 최소값 필터링 clamp() (2) | 2023.04.09 |
---|---|
파이썬 함수 document 작성법 `__doc__` (0) | 2023.04.09 |
python show image with polygon, 파이썬 이미지 폴리곤하고 같이 그리기 (0) | 2023.04.07 |
스타크래프트 유닛 마린을 파이썬 클래스로 작성하는 방법 (0) | 2023.04.06 |
파이썬 함수 만드는 법 (0) | 2023.04.03 |
댓글