Issue 1:
OS: Ubuntu 16.04

PyTorch version: master

How you installed PyTorch (conda, pip, source): source

Python version:3.6.4

CUDA/cuDNN version:9.0/7.0.5

GPU models and configuration: GTX 1080ti

GCC version (if compiling from source): 5.4.0

The complete build log is shown below.

running install
running build_deps
+ WITH_CUDA=0
+ [[ --with-cuda == \-\-\w\i\t\h\-\c\u\d\a ]]
+ WITH_CUDA=1
+ shift
+ WITH_NNPACK=0
+ [[ --with-nnpack == \-\-\w\i\t\h\-\n\n\p\a\c\k ]]
+ WITH_NNPACK=1
+ shift
+ WITH_GLOO_IBVERBS=0
+ [[ nccl == \-\-\w\i\t\h\-\g\l\o\o\-\i\b\v\e\r\b\s ]]
+ CMAKE_INSTALL='make install'
+ USER_CFLAGS=
+ USER_LDFLAGS=
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
++ dirname tools/build_pytorch_libs.sh
+ cd tools/..
+++ pwd
++ printf '%q\n' /data/build/pytorch/pytorch
+ PWD=/data/build/pytorch/pytorch
+ BASE_DIR=/data/build/pytorch/pytorch
+ TORCH_LIB_DIR=/data/build/pytorch/pytorch/torch/lib
+ INSTALL_DIR=/data/build/pytorch/pytorch/torch/lib/tmp_install
+ THIRD_PARTY_DIR=/data/build/pytorch/pytorch/third_party
+ CMAKE_VERSION=cmake
+ C_FLAGS=' -DTH_INDEX_BASE=0 -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/TH" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THC" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THS" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THCS" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THNN" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THCUNN"'
+ C_FLAGS=' -DTH_INDEX_BASE=0 -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/TH" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THC" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THS" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THCS" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THNN" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THCUNN" -DOMPI_SKIP_MPICXX=1'
+ LDFLAGS='-L"/data/build/pytorch/pytorch/torch/lib/tmp_install/lib" '
+ LD_POSTFIX=.so.1
+ LD_POSTFIX_UNVERSIONED=.so
++ uname
+ [[ Linux == \D\a\r\w\i\n ]]
+ LDFLAGS='-L"/data/build/pytorch/pytorch/torch/lib/tmp_install/lib" -Wl,-rpath,$ORIGIN'
+ CPP_FLAGS=' -std=c++11 '
+ GLOO_FLAGS=
+ THD_FLAGS=
+ NCCL_ROOT_DIR=/data/build/pytorch/pytorch/torch/lib/tmp_install
+ [[ 1 -eq 1 ]]
+ GLOO_FLAGS='-DUSE_CUDA=1 -DNCCL_ROOT_DIR=/data/build/pytorch/pytorch/torch/lib/tmp_install'
+ [[ 0 -eq 1 ]]
+ CWRAP_FILES='/data/build/pytorch/pytorch/torch/lib/ATen/Declarations.cwrap;/data/build/pytorch/pytorch/torch/lib/THNN/generic/THNN.h;/data/build/pytorch/pytorch/torch/lib/THCUNN/generic/THCUNN.h;/data/build/pytorch/pytorch/torch/lib/ATen/nn.yaml'
+ CUDA_NVCC_FLAGS=' -DTH_INDEX_BASE=0 -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/TH" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THC" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THS" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THCS" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THNN" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THCUNN" -DOMPI_SKIP_MPICXX=1'
+ [[ '' -eq 1 ]]
+ '[' -z 32 ']'
+ mkdir -p torch/lib/tmp_install
+ for arg in '"$@"'
+ [[ nccl == \n\c\c\l ]]
+ pushd /data/build/pytorch/pytorch/third_party
/data/build/pytorch/pytorch/third_party /data/build/pytorch/pytorch
+ build_nccl
+ mkdir -p build/nccl
+ pushd build/nccl
/data/build/pytorch/pytorch/third_party/build/nccl /data/build/pytorch/pytorch/third_party /data/build/pytorch/pytorch
+ cmake ../../nccl -DCMAKE_MODULE_PATH=/data/build/pytorch/pytorch/cmake/FindCUDA -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/data/build/pytorch/pytorch/torch/lib/tmp_install '-DCMAKE_C_FLAGS= -DTH_INDEX_BASE=0 -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/TH" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THC" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THS" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THCS" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THNN" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THCUNN" -DOMPI_SKIP_MPICXX=1 ' '-DCMAKE_CXX_FLAGS= -DTH_INDEX_BASE=0 -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/TH" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THC" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THS" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THCS" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THNN" -I"/data/build/pytorch/pytorch/torch/lib/tmp_install/include/THCUNN" -DOMPI_SKIP_MPICXX=1 -std=c++11 ' -DCMAKE_SHARED_LINKER_FLAGS=
-- Configuring done
-- Generating done
-- Build files have been written to: /data/build/pytorch/pytorch/third_party/build/nccl
+ make install
[100%] Built target nccl
Install the project...
-- Install configuration: "Release"
-- Up-to-date: /data/build/pytorch/pytorch/torch/lib/tmp_install/include/nccl.h
+ mkdir -p /data/build/pytorch/pytorch/torch/lib/tmp_install/lib
+ cp lib/libnccl.so.1 /data/build/pytorch/pytorch/torch/lib/tmp_install/lib/libnccl.so.1
+ '[' '!' -f /data/build/pytorch/pytorch/torch/lib/tmp_install/lib/libnccl.so ']'
+ popd
/data/build/pytorch/pytorch/third_party /data/build/pytorch/pytorch
+ popd
/data/build/pytorch/pytorch
+ for arg in '"$@"'
+ [[ ATen == \n\c\c\l ]]
+ [[ ATen == \g\l\o\o ]]
+ [[ ATen == \A\T\e\n ]]
+ pushd /data/build/pytorch/pytorch/aten
/data/build/pytorch/pytorch/aten /data/build/pytorch/pytorch
+ build_aten
+ mkdir -p build
+ pushd build
/data/build/pytorch/pytorch/aten/build /data/build/pytorch/pytorch/aten /data/build/pytorch/pytorch
++ '[' ']'
++ echo Release
+ cmake .. -DCMAKE_BUILD_TYPE=Release -DNO_CUDA=0 -DNO_NNPACK=0 -DCUDNN_INCLUDE_DIR=/opt/cudnn-9.0-v7/include -DCUDNN_LIB_DIR=/opt/cudnn-9.0-v7/lib64 -DCUDNN_LIBRARY=/opt/cudnn-9.0-v7/lib64/libcudnn.so.7 -DATEN_NO_CONTRIB=1 -DCMAKE_INSTALL_PREFIX=/data/build/pytorch/pytorch/torch/lib/tmp_install -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_C_FLAGS= -DCMAKE_CXX_FLAGS= -DCMAKE_EXE_LINKER_FLAGS= -DCMAKE_SHARED_LINKER_FLAGS=
-- Autodetected CUDA architecture(s): 6.1 6.1 6.1 6.1
-- Found CUDA with FP16 support, compiling with torch.CudaHalfTensor
-- Removing -DNDEBUG from compile flags
-- Compiling with OpenMP support
-- Compiling with MAGMA support
-- MAGMA INCLUDE DIRECTORIES: /opt/anaconda3-5.0.1/include
-- MAGMA LIBRARIES: /opt/anaconda3-5.0.1/lib/libmagma.a
-- MAGMA V2 check: 1
-- Could not find hardware support for NEON on this machine.
-- No OMAP3 processor on this machine.
-- No OMAP4 processor on this machine.
-- SSE2 Found
-- SSE3 Found
-- AVX Found
-- AVX2 Found
-- Atomics: using GCC intrinsics
-- Checking for [mkl_gf_lp64 - mkl_gnu_thread - mkl_core - gomp - pthread - m - dl]
-- Library mkl_gf_lp64: /opt/anaconda3-5.0.1/lib/libmkl_gf_lp64.so
-- Library mkl_gnu_thread: /opt/anaconda3-5.0.1/lib/libmkl_gnu_thread.so
-- Library mkl_core: /opt/anaconda3-5.0.1/lib/libmkl_core.so
-- Library gomp: -fopenmp
-- Library pthread: /usr/lib/x86_64-linux-gnu/libpthread.so
-- Library m: /usr/lib/x86_64-linux-gnu/libm.so
-- Library dl: /usr/lib/x86_64-linux-gnu/libdl.so
-- MKL library found
-- Found a library with BLAS API (mkl).
-- Found a library with LAPACK API (mkl).
-- Found cuDNN: v7.0.5 (include: /opt/cudnn-9.0-v7/include, library: /opt/cudnn-9.0-v7/lib64/libcudnn.so.7)
-- Found NNPACK (include: /opt/anaconda3-5.0.1/include, library: /opt/anaconda3-5.0.1/lib/libnnpack.a)
-- Found CPUINFO (library: /opt/anaconda3-5.0.1/lib/libcpuinfo.a)
-- Found PTHREADPOOL (library: /opt/anaconda3-5.0.1/lib/libpthreadpool.a)
-- Using python found in /opt/anaconda3-5.0.1//bin/python
disable contrib because ATEN_NO_CONTRIB is set
-- Configuring done
-- Generating done
-- Build files have been written to: /data/build/pytorch/pytorch/aten/build
+ make install -j32
[ 5%] Built target cpuinfo
[ 5%] Built target aten_files_are_generated
Scanning dependencies of target tbb_static
[ 5%] Building CXX object src/ATen/cpu/tbb/CMakeFiles/tbb_static.dir/tbb_remote/src/tbb/tbb_misc.cpp.o
[ 6%] Linking CXX static library libtbb_static.a
[ 14%] Built target tbb_static
[ 14%] Linking CXX shared library libATen.so
cpu/cpuinfo/libcpuinfo.a(current.c.o): In function `cpuinfo_get_current_processor':
current.c:(.text+0x0): multiple definition of `cpuinfo_get_current_processor'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(current.c.o):current.c:(.text+0x0): first defined here
cpu/cpuinfo/libcpuinfo.a(current.c.o): In function `cpuinfo_get_current_core':
current.c:(.text+0x60): multiple definition of `cpuinfo_get_current_core'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(current.c.o):current.c:(.text+0x40): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_processors':
api.c:(.text+0x0): multiple definition of `cpuinfo_get_processors'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0x0): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o):(.bss+0x80): multiple definition of `cpuinfo_processors'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(init.c.o):(.bss+0x20): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_cores':
api.c:(.text+0x30): multiple definition of `cpuinfo_get_cores'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0x10): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o):(.bss+0x78): multiple definition of `cpuinfo_cores'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(init.c.o):(.bss+0x18): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_packages':
api.c:(.text+0x90): multiple definition of `cpuinfo_get_packages'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0x20): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o):(.bss+0x68): multiple definition of `cpuinfo_packages'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(init.c.o):(.bss+0x10): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_processor':
api.c:(.text+0xc0): multiple definition of `cpuinfo_get_processor'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0x30): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o):(.bss+0x20): multiple definition of `cpuinfo_processors_count'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(init.c.o):(.bss+0x8): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_core':
api.c:(.text+0x110): multiple definition of `cpuinfo_get_core'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0x60): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o):(.bss+0x1c): multiple definition of `cpuinfo_cores_count'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(init.c.o):(.bss+0x4): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_package':
api.c:(.text+0x1d0): multiple definition of `cpuinfo_get_package'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0x90): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o):(.bss+0x14): multiple definition of `cpuinfo_packages_count'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(init.c.o):(.bss+0x0): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_processors_count':
api.c:(.text+0x220): multiple definition of `cpuinfo_get_processors_count'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0xc0): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_cores_count':
api.c:(.text+0x250): multiple definition of `cpuinfo_get_cores_count'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0xd0): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_packages_count':
api.c:(.text+0x2b0): multiple definition of `cpuinfo_get_packages_count'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0xe0): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_l1i_caches':
api.c:(.text+0x2e0): multiple definition of `cpuinfo_get_l1i_caches'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0xf0): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o):(.bss+0x40): multiple definition of `cpuinfo_cache'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):(.bss+0x20): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_l1d_caches':
api.c:(.text+0x310): multiple definition of `cpuinfo_get_l1d_caches'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0x100): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_l2_caches':
api.c:(.text+0x340): multiple definition of `cpuinfo_get_l2_caches'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0x110): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_l3_caches':
api.c:(.text+0x370): multiple definition of `cpuinfo_get_l3_caches'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0x120): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_l4_caches':
api.c:(.text+0x3a0): multiple definition of `cpuinfo_get_l4_caches'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0x130): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_l1i_cache':
api.c:(.text+0x3d0): multiple definition of `cpuinfo_get_l1i_cache'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0x140): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o):(.bss+0x0): multiple definition of `cpuinfo_cache_count'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):(.bss+0x0): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_l1d_cache':
api.c:(.text+0x420): multiple definition of `cpuinfo_get_l1d_cache'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0x170): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_l2_cache':
api.c:(.text+0x470): multiple definition of `cpuinfo_get_l2_cache'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0x1a0): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_l3_cache':
api.c:(.text+0x4c0): multiple definition of `cpuinfo_get_l3_cache'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0x1d0): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_l4_cache':
api.c:(.text+0x510): multiple definition of `cpuinfo_get_l4_cache'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0x200): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_l1i_caches_count':
api.c:(.text+0x560): multiple definition of `cpuinfo_get_l1i_caches_count'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0x230): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_l1d_caches_count':
api.c:(.text+0x590): multiple definition of `cpuinfo_get_l1d_caches_count'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0x240): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_l2_caches_count':
api.c:(.text+0x5c0): multiple definition of `cpuinfo_get_l2_caches_count'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0x250): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_l3_caches_count':
api.c:(.text+0x5f0): multiple definition of `cpuinfo_get_l3_caches_count'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0x260): first defined here
cpu/cpuinfo/libcpuinfo.a(api.c.o): In function `cpuinfo_get_l4_caches_count':
api.c:(.text+0x620): multiple definition of `cpuinfo_get_l4_caches_count'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(api.c.o):api.c:(.text+0x270): first defined here
cpu/cpuinfo/libcpuinfo.a(log.c.o): In function `cpuinfo_log_error':
log.c:(.text+0xe0): multiple definition of `cpuinfo_log_error'
/opt/anaconda3-5.0.1/lib/libcpuinfo.a(log.c.o):log.c:(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
src/ATen/CMakeFiles/ATen.dir/build.make:82805: recipe for target 'src/ATen/libATen.so.1' failed
make[2]: *** [src/ATen/libATen.so.1] Error 1
CMakeFiles/Makefile2:233: recipe for target 'src/ATen/CMakeFiles/ATen.dir/all' failed
make[1]: *** [src/ATen/CMakeFiles/ATen.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Issue 2:
🐛 Bug

I run this code on Colab

Running torch.onnx.export gives this error.

/content/DeOldify/deoldify/unet.py:56: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!

if ssh != up_out.shape[-2:]:

/usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py:562: UserWarning: ONNX export failed on ATen operator mv because torch.onnx.symbolic_opset9.mv does not exist

.format(op_name, opset_version, op_name))

KeyError Traceback (most recent call last)

in ()

1 dummy_input = torch.randn(1, 3, 224, 224)

2

----> 3 torch.onnx.export(learn.model.cpu(), dummy_input, "colorizer.onnx")

7 frames

/usr/local/lib/python3.6/dist-packages/torch/onnx/symbolic_registry.py in get_registered_op(opname, domain, version)

89 warnings.warn("ONNX export failed. The ONNX domain and/or version are None.")

90 global _registry

---> 91 return _registry[(domain, version)][opname]

KeyError: 'mv'

To Reproduce

Steps to reproduce the behavior:

Running this code

!git clone https://github.com/jantic/DeOldify.git DeOldify

cd DeOldify

!pip install -r requirements.txt

import fastai
from deoldify.visualize import *

torch.backends.cudnn.benchmark = True
!mkdir 'models'
!wget https://www.dropbox.com/s/zkehq1uwahhbc2o/ColorizeArtistic_gen.pth?dl=0 -O ./models/ColorizeArtistic_gen.pth

from deoldify.generators import gen_inference_deep, gen_inference_wide

root_folder:Path=Path('./')
weights_name:str='ColorizeArtistic_gen'

learn = gen_inference_deep(root_folder=root_folder, weights_name=weights_name)

dummy_input = torch.randn(1, 3, 224, 224)

torch.onnx.export(learn.model.cpu(), dummy_input, "colorizer.onnx")

Expected behavior

I expect the conversion to Onnx.

Environment

PyTorch Version: 1.2.0

OS : Linux

How you installed PyTorch:pip

Python version:3.6