Skip to content

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

Closed

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

Activity

  1. added
    bug
    on Jan 20, 2020
  2. walter-grace commented on Apr 1, 2020

    @walter-grace

    ** SOLVED !pip install numpy scipy librosa unidecode inflect librosa was missing**

    I am getting something similar in respect to no unicode found in cell #2
    Using cache found in /root/.cache/torch/hub/nvidia_DeepLearningExamples_torchhub

    ModuleNotFoundError Traceback (most recent call last)
    in ()
    1 import torch
    ----> 2 tacotron2 = torch.hub.load('nvidia/DeepLearningExamples:torchhub', 'nvidia_tacotron2')

    4 frames
    /root/.cache/torch/hub/nvidia_DeepLearningExamples_torchhub/PyTorch/SpeechSynthesis/Tacotron2/tacotron2/text/cleaners.py in ()
    14
    15 import re
    ---> 16 from unidecode import unidecode
    17 from .numbers import normalize_numbers
    18

    ModuleNotFoundError: No module named 'unidecode'
    I have tried pip installing unicode and it didn't fix it neither

  3. vdsprakash commented on Apr 10, 2020

    @vdsprakash

    I am getting same error, Is there any update regarding this issue ? I could able to generate the .onnx model , but not the RT_engine.plan.

    `[libprotobuf WARNING google/protobuf/io/coded_stream.cc:78] The total number of bytes read was 1331092289

    Segmentation fault (core dumped)
    `

  4. vinhngx commented on May 30, 2020

    @vinhngx
    Contributor

    Please try #540

  5. nvpstr commented on Feb 15, 2021

    @nvpstr
    Contributor

    Solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions