When I try to export like described on the README it gives an error on the model from Google Drive:
python tools/mpii_export_to_onxx.py -a hg -s 2 -b 1 --num-classes 16 --mobile True --in_res 256 --checkpoint checkpoint/mpii_hg_s2_b1_mobile_fpd/model_best.pth.tar --out_onnx checkpoint/mpii_hg_s2_b1_mobile_fpd/model_best.onnx
==> creating model 'hg', stacks=2, blocks=1
=> loading checkpoint 'checkpoint/mpii_hg_s2_b1_mobile_fpd/model_best.pth.tar'
=> loaded checkpoint 'checkpoint/mpii_hg_s2_b1_mobile_fpd/model_best.pth.tar' (epoch 90)
Traceback (most recent call last):
File "tools/mpii_export_to_onxx.py", line 72, in <module>
main(parser.parse_args())
File "tools/mpii_export_to_onxx.py", line 48, in main
torch.onnx.export(model, dummy_input, args.out_onnx)
File "/home/ubuntu/anaconda2/envs/fast-human/lib/python2.7/site-packages/torch/onnx/__init__.py", line 25, in export
return utils.export(*args, **kwargs)
File "/home/ubuntu/anaconda2/envs/fast-human/lib/python2.7/site-packages/torch/onnx/utils.py", line 131, in export
strip_doc_string=strip_doc_string)
File "/home/ubuntu/anaconda2/envs/fast-human/lib/python2.7/site-packages/torch/onnx/utils.py", line 363, in _export
_retain_param_name, do_constant_folding)
File "/home/ubuntu/anaconda2/envs/fast-human/lib/python2.7/site-packages/torch/onnx/utils.py", line 278, in _model_to_graph
_disable_torch_constant_prop=_disable_torch_constant_prop)
File "/home/ubuntu/anaconda2/envs/fast-human/lib/python2.7/site-packages/torch/onnx/utils.py", line 188, in _optimize_graph
graph = torch._C._jit_pass_onnx(graph, operator_export_type)
File "/home/ubuntu/anaconda2/envs/fast-human/lib/python2.7/site-packages/torch/onnx/__init__.py", line 50, in _run_symbolic_function
return utils._run_symbolic_function(*args, **kwargs)
File "/home/ubuntu/anaconda2/envs/fast-human/lib/python2.7/site-packages/torch/onnx/utils.py", line 589, in _run_symbolic_function
return fn(g, *inputs, **attrs)
File "/home/ubuntu/anaconda2/envs/fast-human/lib/python2.7/site-packages/torch/onnx/symbolic.py", line 130, in wrapper
args = [_parse_arg(arg, arg_desc) for arg, arg_desc in zip(args, arg_descriptors)]
File "/home/ubuntu/anaconda2/envs/fast-human/lib/python2.7/site-packages/torch/onnx/symbolic.py", line 90, in _parse_arg
raise RuntimeError("Failed to export an ONNX attribute, "
RuntimeError: Failed to export an ONNX attribute, since it's not constant, please try to make things (e.g., kernel size) static if possible