Note ≡ | RandomResizedCrop 자세히 알아보기
RandomResizedCrop으로 데이터를 확장하는 방법에 대해 코드로 살펴볼 텐데, 먼저 다음 명령을 실행하여 mxnet4을 설치합니다. mxnet 설치가 완료된 후에는 커널을 재시작해야 합니다.
> pip install mxnet > pip install --user mxnet ------ 설치에 실패하면 --user 입력
mxnet 패키지 설치 후 다음과 같은 오류가 발생할 수 있습니다.
(torch_book) C:\WINDOWS\system32>pip install --user mxnet Requirement already satisfied: mxnet in c:\users\jyseo\appdata\roaming\python\python38\site-packages (1.7.0.post2) Requirement already satisfied: requests<2.19.0,>=2.18.4 in c:\users\jyseo\appdata\roaming\python\python38\site-packages (from mxnet) (2.18.4) Requirement already satisfied: graphviz<0.9.0,>=0.8.1 in c:\users\jyseo\appdata\roaming\python\python38\site-packages (from mxnet) (0.8.4) Collecting numpy<1.17.0,>=1.8.2 Using cached numpy-1.16.6-cp38-cp38-win_amd64.whl Requirement already satisfied: idna<2.7,>=2.5 in e:\anaconda3\envs\pytorch\lib\site-packages (from requests<2.19.0,>=2.18.4->mxnet) (2.6) Requirement already satisfied: certifi>=2017.4.17 in e:\anaconda3\envs\pytorch\lib\site-packages (from requests<2.19.0,>=2.18.4->mxnet) (2020.6.20) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in e:\anaconda3\envs\pytorch\lib\site-packages (from requests<2.19.0,>=2.18.4->mxnet) (3.0.4) Requirement already satisfied: urllib3<1.23,>=1.21.1 in e:\anaconda3\envs\pytorch\lib\site-packages (from requests<2.19.0,>=2.18.4->mxnet) (1.22) Installing collected packages: numpy Attempting uninstall: numpy Found existing installation: numpy 1.21.4 Uninstalling numpy-1.21.4: Successfully uninstalled numpy-1.21.4 WARNING: The script f2py.exe is installed in 'C:\Users\jyseo\AppData\Roaming\Python\Python38\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. opencv-python-headless 4.5.2.54 requires numpy>=1.17.3, but you have numpy 1.16.6 which is incompatible. -ensorboard 2.5.0 requires requests<3,>=2.21.0, but you have requests 2.18.4 which is incompatible. transformers 4.10.0 requires numpy>=1.17, but you have numpy 1.16.6 which is incompatible. torchvision 0.9.0 requires torch==1.8.0, but you have torch 1.9.0 which is incompatible. opencv-python 4.5.2.54 requires numpy>=1.17.3, but you have numpy 1.16.6 which is incompatible. Successfully installed numpy-1.16.6