Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Tags
- Hybrid A star
- 경로생성
- path planning
- OSQP
- self driving car
- CUDA
- solver
- CPP
- 정적라이브러리
- MDP
- Motion Planning
- 소프티어
- GIT
- autonomous vehicle
- 백준
- Leetcode
- 동적라이브러리
- C
- 수치최적화
- 공유라이브러리
- DynamicProgramming
- Dubins Path
- C++
- GNN
- PathPlanning
- Recursion
- Graph Neural Network
- 강화학습
- Frenet Coordinate
- 선형대수
Archives
- Today
- Total
Swimmer
PyTorch nn.Linear 본문
참조 : https://pytorch.org/docs/stable/generated/torch.nn.Linear.html
Fully Connected Layer 구성 시 기본적으로 선택하는 식 중 하나
입력 데이터 x에 대해 Linear Transformation (선형 변환)을 계산한다.
$$ y = xA^{T}+b $$
class Torch.nn.Linear (in_features, out_features, bias=True, device=None, dtype=None)
Parameters:
- in_features (int) : input sample의 size
- out_features (int) : output sample의 size
- bias (bool) : (b term), Default : True. False로 설정하면 b term에 대한 학습은 이루어지지 않는다.
Shape:
- Input : (*, H_in) - * means any number of dimensions, H_in = in_features
- Output : (*, H_out) - H_out = out_features
Variables: (학습되는 변수들)
- weight : Linear Transformation의 A에 해당한다. Shape - (out_feature, in_feature). 가중치들은 입력 Feature의 개수를 역수 취한 값의 제곱근 값의 범위로 초기화 된다고 한다. (PyTorch 공식 문서) 왜지..?
- bias : Linear Transformation의 b에 해당한다. Shape (out_features). 이 값도 weight와 동일한 범위로 초기화 된다.
'개념공부 > 기타' 카테고리의 다른 글
2022 Tesla AI day FSD Planning 정리 [작성 중] (0) | 2023.05.09 |
---|---|
[HDAT-DA] 데이터 분석 과정 (0) | 2023.04.06 |
XOR 비트 연산의 특징 및 코딩 문제들 (0) | 2023.01.29 |
파이토치 버전 확인 PyTorch Version Check (0) | 2023.01.25 |
PyTorch 설치 (0) | 2023.01.25 |
Comments