[02] Pytorch Basics
Tensor 다차원 Arrays를 표현하는 pytorch 클래스 사실상 numpy의 ndarray와 동일 ( = 텐서프로 Tensor와 동일 ) import numpy as np n_array = np.arange(10) # array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) n_array = n_array.reshape(2,5) print("ndim :", n_array.ndim, "shape :", n_array.shape) #ndim : 2 shape : (2, 5) import torch t_array = torch.FloatTensor(n_array) print("ndim :", t_array.ndim, "shape :", t_array.shape) # ndim : 2 shape..