pytorch / vision

Datasets, Transforms and Models specific to Computer Vision
https://pytorch.org/vision
BSD 3-Clause "New" or "Revised" License
16.12k stars 6.94k forks source link

InterpolationMode.NEAREST_EXACT not found #7125

Closed namangup closed 1 year ago

namangup commented 1 year ago

🐛 Describe the bug

To Reproduce:

>>> import torchvision
>>> torchvision.transforms.InterpolationMode.NEAREST
<InterpolationMode.NEAREST: 'nearest'>
>>> torchvision.transforms.InterpolationMode.NEAREST_EXACT
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/enum.py", line 384, in __getattr__
    raise AttributeError(name) from None
AttributeError: NEAREST_EXACT

Versions

Collecting environment information...
PyTorch version: 1.13.0a0+936e930
Is debug build: False
CUDA used to build PyTorch: 11.8
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.5 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: Could not collect
CMake version: version 3.24.1
Libc version: glibc-2.31

Python version: 3.8.10 (default, Jun 22 2022, 20:18:18)  [GCC 9.4.0] (64-bit runtime)
Python platform: Linux-4.19.0-23-cloud-amd64-x86_64-with-glibc2.29
Is CUDA available: True
CUDA runtime version: 11.8.89
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: GPU 0: NVIDIA A100-SXM-80GB
Nvidia driver version: 470.57.02
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.7.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.7.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.7.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.7.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.7.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.7.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.7.0
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] functorch==1.13.0a0+936e930
[pip3] numpy==1.22.2
[pip3] pytorch-lightning==1.6.0
[pip3] pytorch-quantization==2.1.2
[pip3] torch==1.13.0a0+936e930
[pip3] torch-tensorrt==1.3.0a0
[pip3] torchinfo==1.7.1
[pip3] torchmetrics==0.11.0
[pip3] torchsummary==1.5.1
[pip3] torchtext==0.13.0a0+fae8e8c
[pip3] torchvision==0.15.0a0
[conda] Could not collect
pmeier commented 1 year ago

InterpolationMode.NEAREST_EXACT was only made available in bdc55567d0e0f639b1c7b1dc4374819bd1b9693f, so it didn't make it in the 0.14 release.

I see you have

[pip3] torchvision==0.15.0a0

which doesn't look like a nightly build or one from source either. How did you install torchvision?

namangup commented 1 year ago

InterpolationMode.NEAREST_EXACT was only made available in bdc55567d0e0f639b1c7b1dc4374819bd1b9693f, so it didn't make it in the 0.14 release.

Oh, it makes sense then.

I see you have

[pip3] torchvision==0.15.0a0

which doesn't look like a nightly build or one from source either. How did you install torchvision?

I am using a NVIDIA NGC container for PyTorch. They compile from source, although I'm not sure about the exact torchvision version from their release notes.

pip also fetches from their mirror of pypi, in case I ever would have used it.