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 | 29 | 30 | 31 |
Tags
- CT
- Emoji
- AWS
- 평가지표
- Anaconda
- Homogeneous Coordinates
- ml
- ubuntu
- error
- MySQL
- coursera
- https
- pytorch
- Cost Function
- relaxation time
- EC2
- kernel
- FSL
- git
- Map-reduce
- procedure
- ssl
- 동차좌표계
- Dual energy X-ray
- nodejs
- pm2
- NRMSE
- x-ray
- MRI
- object detection
Archives
- Today
- Total
Pay it Forward
[Error] Pytorch - transforms.RandomRotation : function takes exactly 1 argument (3 given) 에러 해결 본문
Machine Learning/Pytorch
[Error] Pytorch - transforms.RandomRotation : function takes exactly 1 argument (3 given) 에러 해결
minjoony 2021. 3. 31. 12:45728x90
Pytorch-torchvision의 transforms 라이브러리를 사용하여 Data augmentation을 진행하던 도중 마주친 에러.
TypeError: function takes exactly 1 argument (3 given)
Stack overflow에 따르면 torch와 Pillow version의 호환문제로 인해 발생한 것으로,
다음과 같이 fill = (0,) 을 RandomRotation 함수에 추가하여 해결할 수 있다.
aug_methods = transforms.RandomRotation(30, expand=False, fill=(0,))
아래는 코드 전문.
728x90
'Machine Learning > Pytorch' 카테고리의 다른 글
[Error] UserWarning: Argument fill/fillcolor is not supported for Tensor input 에러 해결 (0) | 2022.04.20 |
---|---|
[Pytorch] 특정 GPU 사용하기 / 여러개의 multi GPU parallel 하게 사용하기 (10) | 2021.06.03 |
Comments