인공지능 (AI)
/
Tensor Manipulation 1
Search
Duplicate
Tensor Manipulation 1
태그
PyTorch
Tensor Manipulation 1
Lab-01-1 Tensor Manipulation 1.pdf
812.1KB
실습 공간
Vector, Matrix and Tensor
Vector
•
1차원으로 이루어져 있는 값
Matrix
•
2차원으로 이루어져 있는 경우
Tensor
•
3차원으로 이루어져 있는 경우
2D Tensor
•
∣
t
∣
=
(
b
a
t
c
h
|t|=(batch
∣
t
∣
=
(
ba
t
c
h
s
i
z
e
,
d
i
m
)
size, dim)
s
i
ze
,
d
im
)
3D Tensor
•
∣
t
∣
=
(
b
a
t
c
h
|t| = (batch
∣
t
∣
=
(
ba
t
c
h
s
i
z
e
,
w
i
d
t
h
,
h
e
i
g
h
t
)
size, width, height)
s
i
ze
,
w
i
d
t
h
,
h
e
i
g
h
t
)
•
∣
t
∣
=
(
b
a
t
c
h
|t| = (batch
∣
t
∣
=
(
ba
t
c
h
s
i
z
e
,
l
e
n
g
t
h
,
d
i
m
)
size, length, dim)
s
i
ze
,
l
e
n
g
t
h
,
d
im
)
Import
pip
install
-r
requirements.txt
Shell
복사
import
numpy
as
np
import
torch
Python
복사
Broadcasting
Multiplication vs Matrix Multiplication
Mean
Sum
Max and Argmax