공부해볼라는 스토리

  • 홈
  • 태그
  • 방명록

error #python #runtimeerror #grad_fn #requres_grad 1

[ERROR] Runtimeerror: element 0 of tensors does not require grad and does not have a grad_fn

정말 왜 이런 오류가 떠서 날 괴롭히는지 첨엔 인자 설정을 잘못했나, 코드를 잘못건드렸나 싶었는데 구글링 해보니까 다들 requires_grad=True 설정 얘기 자주하고, 챗지피티도 그거나 아니면 뭐 데이터형태가 잘못나왔다 이런얘기만 하길래 어떻게 해야하나 했는데 사실 간단한 해결이었다. requirements.txt 파일보고 내 가상환경 버전을 보게됐는데 너무 오버스펙이었다,,,,,,,,,,,,, ㅠㅠ 나같은 경우는 pytorch-lightning 버전을 다운그레이드 하니까 되었다. 혹시 보시는 분들은 저처럼 삽질하지마시고 빠르게 해결하시길,,

Python/Error 2023.08.23
이전
1
다음
더보기
프로필사진

NLP 잘하고 싶다 https://github.com/HyeLynnKIM

  • 분류 전체보기 (141)
    • ML\DL (19)
      • LGAimers (13)
      • Machine Learning (2)
      • Deep Learning (2)
    • Algorithm (68)
      • BOJ (22)
      • Programmers (14)
      • SQL (9)
      • STUDY (17)
    • Python (13)
      • Error (9)
    • NLP (29)
      • Transformers for NLP (5)
      • Paper Review (14)
      • Do it! ~ NLP (5)
    • DataAnalysis (1)
    • Latex\Overleaf (1)
    • Github (4)
      • Git (0)
      • Markdown (2)
    • Etc (4)
    • 취준 (0)

Tag

Python #KFold #StratifiedKFold #sklearn, Programmers #SQL #MySQL #Oracle, bash #conda #activate, python, python #re #정규표현식 #정규식, latex #overleaf #chicago #reference, NLP #GLUE #GLUE TASK #NLU, python #error #torch, programmers, if, NLP #QA #EMNLP #SQuAD, Error #RuntimeError #tensor, lstm #binary분류 #python, linux #한영전환키 #xrdp #Hangul, cuda #tensorflow #cuda10.0 #gpu, error #python #runtimeerror #grad_fn #requres_grad, TRY,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/08   »
일 월 화 수 목 금 토
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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바