thanks for you work,I failed as follows,
traced_script_module = torch.jit.trace(model, example)
File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 882, in trace
check_tolerance, _force_outplace, _module_class)
File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 1028, in trace_module
module = make_module(mod, _module_class, _compilation_unit)
File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 727, in make_module
return _module_class(mod, _compilation_unit=_compilation_unit)
File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 1836, in init
tmp_module._modules[name] = make_module(submodule, TracedModule, _compilation_unit=None)
File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 727, in make_module
return _module_class(mod, _compilation_unit=_compilation_unit)
File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 1836, in init
tmp_module._modules[name] = make_module(submodule, TracedModule, _compilation_unit=None)
File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 727, in make_module
return _module_class(mod, _compilation_unit=_compilation_unit)
File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 1836, in init
tmp_module._modules[name] = make_module(submodule, TracedModule, _compilation_unit=None)
File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 727, in make_module
return _module_class(mod, _compilation_unit=_compilation_unit)
File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 1836, in init
tmp_module._modules[name] = make_module(submodule, TracedModule, _compilation_unit=None)
File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 727, in make_module
return _module_class(mod, _compilation_unit=_compilation_unit)
File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 1836, in init
tmp_module._modules[name] = make_module(submodule, TracedModule, _compilation_unit=None)
File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 727, in make_module
return _module_class(mod, _compilation_unit=_compilation_unit)
File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 1809, in init
assert(isinstance(orig, torch.nn.Module))
AssertionError
thanks for you work,I failed as follows, traced_script_module = torch.jit.trace(model, example) File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 882, in trace check_tolerance, _force_outplace, _module_class) File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 1028, in trace_module module = make_module(mod, _module_class, _compilation_unit) File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 727, in make_module return _module_class(mod, _compilation_unit=_compilation_unit) File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 1836, in init tmp_module._modules[name] = make_module(submodule, TracedModule, _compilation_unit=None) File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 727, in make_module return _module_class(mod, _compilation_unit=_compilation_unit) File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 1836, in init tmp_module._modules[name] = make_module(submodule, TracedModule, _compilation_unit=None) File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 727, in make_module return _module_class(mod, _compilation_unit=_compilation_unit) File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 1836, in init tmp_module._modules[name] = make_module(submodule, TracedModule, _compilation_unit=None) File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 727, in make_module return _module_class(mod, _compilation_unit=_compilation_unit) File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 1836, in init tmp_module._modules[name] = make_module(submodule, TracedModule, _compilation_unit=None) File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 727, in make_module return _module_class(mod, _compilation_unit=_compilation_unit) File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 1836, in init tmp_module._modules[name] = make_module(submodule, TracedModule, _compilation_unit=None) File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 727, in make_module return _module_class(mod, _compilation_unit=_compilation_unit) File "/root/anaconda3/lib/python3.7/site-packages/torch/jit/init.py", line 1809, in init assert(isinstance(orig, torch.nn.Module)) AssertionError