Closed elainewangprc closed 5 years ago
Hi @elainewangprc Fixed some problem. Try use follow command:
python3 main.py --model resnet34_vtn_rgbdiff --clip-size 16 --st 2 --pretrain-path ~/resnet_34_vtn_rgbd_kinetics.pth --onnx resnet34_vtn_rgbd.onnx --no-cuda --no-layer-norm
--no-cuda
- to run in environment without cuda
--no-layer-norm
- to ignore LayerNormalization
that can not be converted to ONNX, but this may lead to decrease accuracy of final model.
Hi Alex, Thank you for fixing the issue! Now I'm able to convert the pre-trained model into ONNX format.
I'd like to convert the pre-trained action recognition model to OpenVINO IR files. So I followed the instructions at https://github.com/opencv/openvino_training_extensions/tree/develop/pytorch_toolkit/action_recognition. In the first step that convert the model to ONNX, I saw below error message:
Traceback (most recent call last): File "main.py", line 385, in
main()
File "main.py", line 330, in main
export_onnx(args, model, args.onnx)
File "main.py", line 36, in export_onnx
model = model.module
File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 539, in getattr
type(self).name, name))
AttributeError: 'VideoTransformer' object has no attribute 'module'
Steps to Reproduce (for bugs)
I want to convert the pre-trained decoder and encoder model to OpenVINO IR files. Like https://github.com/opencv/open_model_zoo/blob/master/intel_models/action-recognition-0001-encoder/description/action-recognition-0001-encoder.md and https://github.com/opencv/open_model_zoo/blob/master/intel_models/action-recognition-0001-decoder/
Your Environment