728x90 반응형 Attribute1 [DL] Tensor 객체의 attributes: ndim, shape, dtype Class들Python에서Tensor 를 추상화하는 대표적인 class는 다음과 같음.NumPy의 ndarray: numpy.arrayPyTorch의 tensorTensorflow의 constant대표 Attributes이들의 대표적인 attributes는 다음과 같음.dtype: the datatype of elementndim: the number of dimension (차원의 수로, rank라고도 불림)shape: ndim의 갯수로 구성된 sequence type의 인스턴스로 각 축의 크기를 나타냄.다음은 Tensorflow에서는 지원하지 않으나, PyTorch와 NumPy에선 지원하는 것들임.itemsize: element 하나가 차지하는 bytes 크기.size or size(): numpy는.. 2024. 3. 15. 이전 1 다음 728x90 반응형