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
- Attention
- word2vec
- Self-loop attention
- sentence embedding
- GNN
- Set Transformer
- pytorch
- neural net
- overfitting
- sigmoid
- Transformer
- NLP
- python practice
- XOR
- Python
- Classificaion
- abstraction
- elif
- deep learning
- machine learning
Archives
- Today
- Total
목록datatype (1)
Research Notes
[Solved] IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number
문제상황: pytorch에서 model을 돌리다가 해당 에러가 뜸 이유: pytorch 이전 버전(0.5)에서 작성된 코드를 돌릴 때 뜨는 에러, pytorch의 데이터 자료 구조가 변경되었다고 함 코드에서 변수명.data[0] --> 변수명.data로 바꾸면 해결됨
Programming Language/Python
2022. 9. 22. 11:18