You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bug is simple. The Flowers102 dataset uses incorrect label indexing. It uses 1-based indexing and it should use 0-based indexing.
If you stop a debugger at this line, you will see that labels['labels'] contains the labels from 1 to 102. The labels should be zero indexed (i.e. 0 to 101) to follow pytorch conventions.
A simple fix is to add the following line after line 67: labels['labels'] -= 1
Versions
Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A
OS: Ubuntu 18.04.5 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: Could not collect
CMake version: version 3.15.5
Libc version: glibc-2.10
Python version: 3.7.9 (default, Aug 31 2020, 12:42:55) [GCC 7.3.0] (64-bit runtime)
Python platform: Linux-5.4.0-1073-azure-x86_64-with-debian-buster-sid
Is CUDA available: N/A
CUDA runtime version: 10.1.243
GPU models and configuration: GPU 0: Tesla V100-PCIE-16GB
Nvidia driver version: 460.91.03
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A
Thanks for the report @jfb54 , you're are right. This has already been reported in #5766, and the fix will be available in the next version of torchvision.
🐛 Describe the bug
The bug is simple. The Flowers102 dataset uses incorrect label indexing. It uses 1-based indexing and it should use 0-based indexing.
If you stop a debugger at this line, you will see that
labels['labels']
contains the labels from 1 to 102. The labels should be zero indexed (i.e. 0 to 101) to follow pytorch conventions.A simple fix is to add the following line after line 67:
labels['labels'] -= 1
Versions
Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A
OS: Ubuntu 18.04.5 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: Could not collect
CMake version: version 3.15.5
Libc version: glibc-2.10
Python version: 3.7.9 (default, Aug 31 2020, 12:42:55) [GCC 7.3.0] (64-bit runtime)
Python platform: Linux-5.4.0-1073-azure-x86_64-with-debian-buster-sid
Is CUDA available: N/A
CUDA runtime version: 10.1.243
GPU models and configuration: GPU 0: Tesla V100-PCIE-16GB
Nvidia driver version: 460.91.03
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A
Versions of relevant libraries:
[pip3] numpy==1.19.2
[conda] blas 1.0 mkl
[conda] mkl 2020.2 256
[conda] mkl-service 2.3.0 py37he8ac12f_0
[conda] mkl_fft 1.2.0 py37h23d657b_0
[conda] mkl_random 1.1.1 py37h0573a6f_0
[conda] numpy 1.19.2 py37h54aff64_0
[conda] numpy-base 1.19.2 py37hfa32c7d_0
The text was updated successfully, but these errors were encountered: