[파이썬 에러] No module named 'torchvision.transforms.functional_tensor'

2024. 6. 7. 14:44·에러 해결 모음집
728x90
반응형

에러 코드

from torchvision.transforms.functional_tensor import rgb_to_grayscale
ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor'

 

원인

이 오류의 원인은 정확히는 모르겠다.

torchvision의 버전이 바뀌면서 메소드 명이 바뀐 것이라고 추측하고 있다.

 

해결법

1.  from torchvision.transforms.functional import rgb_to_grayscale

functional 뒤에 '_tensor'를 지워주면 정상적으로 실행된다!

 


 

궁금한 점이 있으시다면 댓글 남겨주세요 ❣️

728x90
반응형

'에러 해결 모음집' 카테고리의 다른 글

[파이썬 에러] TypeError: read() got an unexpected keyword argument 'ignoregamma’  (1) 2025.02.05
[파이썬 에러] 'numpy.ndarray' object has no attribute 'dim'.  (0) 2024.06.11
[파이썬 에러] cannot import name 'imresize' from 'scipy.misc'  (2) 2024.05.30
[파이썬 에러] gensim 4.3.0 requires FuzzyTM>=0.4.0, which is not installed  (3) 2024.05.30
[파이썬 에러] ERROR: Failed building wheel for numpy  (1) 2024.05.30
'에러 해결 모음집' 카테고리의 다른 글
  • [파이썬 에러] TypeError: read() got an unexpected keyword argument 'ignoregamma’
  • [파이썬 에러] 'numpy.ndarray' object has no attribute 'dim'.
  • [파이썬 에러] cannot import name 'imresize' from 'scipy.misc'
  • [파이썬 에러] gensim 4.3.0 requires FuzzyTM>=0.4.0, which is not installed
View synthesis 공부하는 대학원생
View synthesis 공부하는 대학원생
AI - view synthesis에 대해 공부하고 있으며, AI 공부하시는 분들과 함께 소통하고 싶습니다 😍
  • View synthesis 공부하는 대학원생
    Happy Support's Blog
    View synthesis 공부하는 대학원생
  • 전체
    오늘
    어제
    • 분류 전체보기 (63)
      • View synthesis (3)
      • Backbone (5)
      • Generative Models (5)
      • On-device AI (3)
      • ML (2)
      • DL (1)
      • LLM (2)
      • 코딩테스트 (25)
      • 에러 해결 모음집 (12)
      • 기타 (4)
  • 링크

  • 인기 글

  • 최근 댓글

  • 최근 글

  • 250x250
    반응형
  • hELLO· Designed By정상우.v4.10.3
View synthesis 공부하는 대학원생
[파이썬 에러] No module named 'torchvision.transforms.functional_tensor'
상단으로

티스토리툴바