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 |
Tags
- Graph Theory
- weight 일부 고정
- 일부 레이어 고정
- 시계열 라이브러리
- sktime tutorial
- EDA 추천 파이썬
- pandas 조건
- 선형함수 딥러닝
- 판다스 조건
- Skip connection
- pretraining
- pytorch 데이터셋 나누기
- layer 일부 freeze
- pandas
- 비선형함수
- pandas 특정 조건 열 제거
- sktime 튜토리얼
- Does GNN Pretraining Help Molecular Representation?
- Prompt Tuning for Graph Neural Networks
- molecular representation
- pandas row 제거
- sktime 예제
- sktime
- pytorch dataset split
- python 경우의 수
- pandas 행 제거
- EDA in python
- 모델 freeze
- 경우의 수 파이썬
- 비선형함수 딥러닝
Archives
- Today
- Total
MoonNote
torch.sum( dim) 본문
torch.sum 에는 차원을 정해주는 argument가 있다.
dim=0 column 별로 더한 값이고
dim=1 은 row별로 더한 값을 출력한다.
import torch
a = torch.randn(2, 3)
>>>print(a)
>>>print(torch.sum(a, dim=0))
>>>print(torch.sum(a, dim=1))
tensor([[-0.2771, 0.4708, 0.7797],
[ 2.8122, -1.0677, 1.7852]])
tensor([ 2.5351, -0.5969, 2.5649])
tensor([0.9734, 3.5298])
'Study > Python' 카테고리의 다른 글
주소 (0) | 2021.09.09 |
---|---|
EDA library 추천: pandas-profiling (0) | 2021.08.20 |
pandas: 특정 조건의 row를 drop하기 (0) | 2021.07.17 |
pandas: 조건 일치하는 dataframe 출력 (0) | 2021.07.16 |
파이썬(Python)에서 모든 조합 구하기 (0) | 2021.07.14 |
Comments