Skip to content

PyTorch 1.3 inference output is different from PyTorch 1.2 #28197

@shijianjian

Description

@shijianjian

🐛 Bug

I tested with EfficientNet-b0, b3, which were trained around one week ago with promising results with PyTorch 1.2, CUDA 10.0. After I upgraded PyTorch from 1.2 to 1.3, CUDA 10.0 to 10.1, the inferencing using the exact model and weights gave different results. I am not sure is it expected or a bug in 1.3.

To Reproduce

Steps to reproduce the behavior:

  1. Inferencing with EfficientNet-b0 on PyTorch 1.2, CUDA 10.0.
  2. Inferencing with EfficientNet-b0 on PyTorch 1.3 CUDA 10.1.
  3. Comparison.

I got AUC of my model improved or decrease in +/- 0.1 or so.

Expected behavior

It shall be all identical among runs.

Environment

Collecting environment information...
PyTorch version: 1.3.0
Is debug build: No
CUDA used to build PyTorch: 10.1.243

OS: Ubuntu 18.04.3 LTS
GCC version: (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
CMake version: version 3.10.2

Python version: 3.7
Is CUDA available: Yes
CUDA runtime version: 10.1.243
GPU models and configuration:
GPU 0: Tesla V100-DGXS-32GB
GPU 1: Tesla V100-DGXS-32GB
GPU 2: Tesla V100-DGXS-32GB
GPU 3: Tesla V100-DGXS-32GB

Nvidia driver version: 418.87.01
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.2

Versions of relevant libraries:
[pip] efficientnet-pytorch==0.4.0
[pip] numpy==1.16.4
[pip] pytorch-ignite==0.2.1
[pip] pytorch-lightning==0.4.9
[pip] robust-loss-pytorch==0.0.2
[pip] torch==1.3.0
[pip] torch-dct==0.1.5
[pip] torchsummary==1.5.1
[pip] torchvision==0.4.1
[conda] blas 1.0 mkl
[conda] efficientnet-pytorch 0.4.0 pypi_0 pypi
[conda] mkl 2019.4 243
[conda] mkl-service 2.0.2 py37h7b6447c_0
[conda] mkl_fft 1.0.14 py37ha843d7b_0
[conda] mkl_random 1.0.2 py37hd81dba3_0
[conda] pytorch-ignite 0.2.1 pypi_0 pypi
[conda] pytorch-lightning 0.4.9 pypi_0 pypi
[conda] robust-loss-pytorch 0.0.2 pypi_0 pypi
[conda] torch 1.3.0 pypi_0 pypi
[conda] torch-dct 0.1.5 pypi_0 pypi
[conda] torchsummary 1.5.1 pypi_0 pypi
[conda] torchvision 0.4.1 pypi_0 pypi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions