Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- MySQL
- object detection
- coursera
- Homogeneous Coordinates
- x-ray
- relaxation time
- Emoji
- error
- 평가지표
- ml
- 동차좌표계
- AWS
- MRI
- pytorch
- NRMSE
- CT
- Dual energy X-ray
- git
- ubuntu
- ssl
- Anaconda
- nodejs
- https
- FSL
- Cost Function
- pm2
- procedure
- Map-reduce
- EC2
- kernel
Archives
- Today
- Total
Pay it Forward
[Error] UserWarning: Argument fill/fillcolor is not supported for Tensor input 에러 해결 본문
Machine Learning/Pytorch
[Error] UserWarning: Argument fill/fillcolor is not supported for Tensor input 에러 해결
minjoony 2022. 4. 20. 21:32728x90
Pytorch를 사용하여 모델을 돌리던 중, augmentation으로써 RandomRotation을 사용하고,
이미지가 돌아갔을 때(rotate) 생기는 여백의 공간을 0으로 채우기 위하여 아래와 같이 코드를 작성하였다.
from torchvision import transforms as transforms
trans = transforms.RandomRotation(degrees=args.aug_degree, fill = (0,))
img_trans = trans(img)
그러나 다음과 같은 에러를 맞이하였다.
UserWarning: Argument fill/fillcolor is not supported for Tensor input
알아본 결과 해결방법은 아래와 같다.
Torchvision version > v0.9.0으로 설치하기.
conda list를 통해 자신의 torchvision 버전을 확인하고,
만약 버전이 v0.9.0보다 작다면 아래와 같은 방식으로 uninstall 후, v0.9.0으로 설치해주면 된다.
conda uninstall torchvision
pip install torchvision==0.9.0
728x90
'Machine Learning > Pytorch' 카테고리의 다른 글
[Pytorch] 특정 GPU 사용하기 / 여러개의 multi GPU parallel 하게 사용하기 (11) | 2021.06.03 |
---|---|
[Error] Pytorch - transforms.RandomRotation : function takes exactly 1 argument (3 given) 에러 해결 (0) | 2021.03.31 |
Comments