Skip to content

[Jasper/PyTorch] Colab notebook doesn't work #378

@tugstugi

Description

@tugstugi

The included Colab notebook https://github.com/NVIDIA/DeepLearningExamples/blob/master/PyTorch/SpeechRecognition/Jasper/notebooks/Colab_Jasper_TRT_inference_demo.ipynb doesn't work and fails with the following error:

Traceback (most recent call last):
  File "../trt/perf.py", line 23, in <module>
    import trtutils
  File "/content/DeepLearningExamples/PyTorch/SpeechRecognition/Jasper/trt/trtutils.py", line 18, in <module>
    import onnxruntime as ort
ModuleNotFoundError: No module named 'onnxruntime'

After manually installing onnxruntime==0.5.0, it fails again with the following message:

Getting component
Traceback (most recent call last):
  File "../trt/perf.py", line 132, in <module>
    main(args)
  File "../trt/perf.py", line 38, in main
    pyt_components, saved_onnx = perfutils.get_pytorch_components_and_onnx(args)
  File "/content/DeepLearningExamples/PyTorch/SpeechRecognition/Jasper/trt/perfutils.py", line 225, in get_pytorch_components_and_onnx
    onnx_path = get_onnx(args.onnx_path, model, args)
  File "/content/DeepLearningExamples/PyTorch/SpeechRecognition/Jasper/trt/perfutils.py", line 118, in get_onnx
    phony_signal = torch.zeros(signal_shape, dtype=torch.float, device=torch.device("cuda"))
TypeError: zeros(): argument 'size' must be tuple of ints, but found element of type Tensor at pos 3
bash: line 6:  1294 Segmentation fault      (core dumped) python ../trt/perf.py --ckpt_path ./jasper_fp16.pt --wav=example1.wav --model_toml=../configs/jasper10x5dr_nomask.toml --make_onnx --onnx_path jasper.onnx --engine_path jasper.plan

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions