Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError 1920 #9

Open
Kayce001 opened this issue Apr 9, 2022 · 1 comment
Open

KeyError 1920 #9

Kayce001 opened this issue Apr 9, 2022 · 1 comment

Comments

@Kayce001
Copy link

Kayce001 commented Apr 9, 2022

using the official command: python main.py --mode test --cuda 0 --version ASMAfinal --dataloader_workers 8 --testImgRoot ./bench/ --nodeName localhost --checkpoint 350000 --testScriptsName common_useage --specify_sytle 8

then error happened
Generator Script Name: Conditional_Generator_asm
11 classes
Finished preprocessing the test dataset, total image number: 25...
/home/ama/anaconda3/envs/ASMA/lib/python3.9/site-packages/torchvision/transforms/transforms.py:332: UserWarning: Argument interpolation should be of type InterpolationMode instead of int. Please, use InterpolationMode enum.
warnings.warn(
Traceback (most recent call last):
File "/home/ama/ASMAGAN/main.py", line 266, in
tester.test()
File "/home/ama/ASMAGAN/test_scripts/tester_common_useage.py", line 50, in test
test_data = TestDataset(test_img,batch_size)
File "/home/ama/ASMAGAN/data_tools/test_data_loader_resize.py", line 36, in init
transform.append(T.Resize(1088,1920))
File "/home/ama/anaconda3/envs/ASMA/lib/python3.9/site-packages/torchvision/transforms/transforms.py", line 336, in init
interpolation = _interpolation_modes_from_int(interpolation)
File "/home/ama/anaconda3/envs/ASMA/lib/python3.9/site-packages/torchvision/transforms/functional.py", line 47, in _interpolation_modes_from_int
return inverse_modes_mapping[i]
KeyError: 1920

@thibault-assiste-par-ordinateur

I think it's not working because you are running python3.9.
You should use a specific python3.6 environment as described
$ conda create -n ASMA python=3.6
$ conda activate ASMA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants