본문 바로가기
목차
Python

[DL] Tensor 다루기 기초 - PyTorch 중심

by ds31x 2025. 3. 7.
728x90
반응형

https://dsaint31.tistory.com/891

 

[ML] Tensor: Scalar, Vector, Matrix.

Tensor 종류1. Scalar (0차원 tensor)하나의 숫자로 표현되는 가장 기본적인 형태.크기(magnitude)만을 가지며 방향은 없음.예시: 온도(25°C), 나이(20), 가격(1000원)# 파이썬/NumPy에서의 표현scalar = 5.02. Vector (

dsaint31.tistory.com

https://dsaint31.tistory.com/456

 

[Programming] Primitive Data Type : C, C++, NumPy, Torch

Primitive Data Type이(Unboxed type)란?C, C++, NumPy, PyTorch, TensorFlow 등에서 사용되는numeric data type들은보통 unboxed type 이라고도 불리는 primitive data type들이다.unboxed type에서는할당된 메모리 bit들이 해당 numeri

dsaint31.tistory.com

2024.03.15 - [Python] - [DL] Tensor 객체의 attributes: ndim, shape, dtype

 

[DL] Tensor 객체의 attributes: ndim, shape, dtype

Class들Python에서Tensor 를 추상화하는 대표적인 class는 다음과 같음.NumPy의 ndarray: numpy.arrayPyTorch의 torch.Tensor : torch.tensor()로 생성.Tensorflow의 tf.Tensor : tf.constant(), tf.convert_to_tensor(), tf.Variable 등으로 생

ds31x.tistory.com

 

2025.03.13 - [Python] - [PyTorch] 생성 및 초기화, 기본 조작

 

[PyTorch] tensor 생성 및 초기화, 기본 조작

참고로, NumPy에 대한 것은 다음을 참고:더보기2024.09.09 - [Python] - [NumPy] 생성 및 초기화, 기본 조작 (1) [NumPy] 생성 및 초기화, 기본 조작 (1)1. ndarray 생성하기 (=tensor생성하기)np.array ( seq [,dtype])list 나

ds31x.tistory.com

 

2024.03.18 - [Python] - [DL] Tensor: Indexing <Simple, Slicing, Fancy, Boolean Mask>

 

[DL] Tensor: Indexing <Simple, Slicing, Fancy, Boolean Mask>

NumPy나 PyTorch, Tensorflow의 텐서들도파이썬의 list 또는 tubple 에서의 indexing과 slicing이 거의 그대로 사용됨.2023.07.12 - [Python] - [Python] list (sequence type) : summary [Python] list (sequence type) : summarylist는 ordered m

ds31x.tistory.com

 

2025.12.04 - [ML] - [PyTorch] tensor의 vectorized operation***

 

[PyTorch] tensor의 vectorized operation

PyTorch에서 제공하는 Tensor OperatorsPyTorch에서 제공하는 텐서 연산(operator)은homogeneous하고 contiguous한 텐서에 대해모든 element에 동일한 연산을 적용하도록 설계된vectorized operation의 형태를 취함.다른

ds31x.tistory.com


참고

2024.09.09 - [Python] - [NumPy] 생성 및 초기화, 기본 조작 (1)

 

[NumPy] 생성 및 초기화, 기본 조작 (1)

1. ndarray 생성하기 (=tensor생성하기)np.array ( seq [,dtype])list 나 tuple 등의 sequence 객체로부터 ndarray 생성.dtype : data type of element.float64 : default type in the numpy. *uint8 : unsigned int (8bit), the most commonly used for im

ds31x.tistory.com


 

728x90