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
- 푸리에 변환
- 크롤링할때 중요한것
- Fourier
- 서버 os
- transductive learning
- fourier 변환
- docker commands
- python패키지설치
- rnn구현
- 푸리에변환이란
- 크롤링 주의사항
- dlib 설치
- Machine Learning
- python2 python3
- 머신러닝 딥러닝
- inductive transductive
- fourier transform
- 서버로 파일 복사
- transductive
- 피티이
- inductive
- 기초머신러닝
- python버전 동시 사용
- inductive learning
- rnn
- 푸리에
- 머신러닝
- virtual env
- 로컬에서 서버
- continous deployment
Archives
- Today
- Total
우당탕탕 도비의 코딩로그
[Pytorch] IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1) 해결하기 본문
ERROR_SOLUTION/PYTORCH
[Pytorch] IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1) 해결하기
dobbie 2021. 2. 26. 21:52반응형
nn.CosineEmbeddingLoss(x_1, x_2, y) 를 불러올때 batch_size가 1인 경우에는
각각 x_1, x_2, y tensor들의 shape 을 정의해주니 해결되었다.
나의 경우에는 tensor의 shape이 [1,64] 이어서
x_1.reshape(1,64)
x_2.reshape(1,64)
y.reshape(1,64)
로 각각 정의해주었다.
반응형
Comments