xinntao / EDVR

Winning Solution in NTIRE19 Challenges on Video Restoration and Enhancement (CVPR19 Workshops) - Video Restoration with Enhanced Deformable Convolutional Networks. EDVR has been merged into BasicSR and this repo is a mirror of BasicSR.
https://github.com/xinntao/BasicSR
1.48k stars 320 forks source link

RuntimeError occurred when I used 'torch.jit.trace' to transform pytorch model to libtorch model #100

Open yinnhao opened 4 years ago

yinnhao commented 4 years ago

RuntimeError occurred when I used 'torch.jit.trace' to transform pytorch model to libtorch model. Anybody knows how to get the pt model? Thx

RuntimeError: 
could not export python function call _DCNv2. Remove calls to python functions before export.:
/data/gitlab/edvr/codes/models/modules/DCNv2/dcn_v2.py(140): forward
/home/iqiyi/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py(477): _slow_forward
/home/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py(487): __call__
/data/gitlab/edvr_inference/codes/models/modules/EDVR_arch.py(104): forward
/home/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py(477): _slow_forward
/home/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py(487): __call__
/data/gitlab/edvr_inference/codes/models/modules/EDVR_arch.py(328): forward
/home/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py(477): _slow_forward
/home/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py(487): __call__
/home/anaconda3/lib/python3.7/site-packages/torch/jit/__init__.py(636): trace
/data/gitlab/edvr/codes/trans_to_pt.py(40): <module>