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 |
Tags
- relaxation time
- FSL
- error
- Homogeneous Coordinates
- ml
- MRI
- Emoji
- Cost Function
- Map-reduce
- 평가지표
- CT
- kernel
- ssl
- nodejs
- NRMSE
- pytorch
- Dual energy X-ray
- coursera
- procedure
- EC2
- x-ray
- pm2
- Anaconda
- git
- object detection
- AWS
- https
- MySQL
- 동차좌표계
- ubuntu
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 하게 사용하기 (11) | 2021.06.03 |