onnx

module 'torch.onnx.symbolic_helper' has no attribute 'quantized_args'

module 'torch.onnx.symbolic_helper' has no attribute 'quantized_args' Question: while importing transforms from torchvision I am getting the following error module ‘torch.onnx.symbolic_helper’ has no attribute ‘quantized_args’ import that I performed from torchvision import transforms prior to the error it throws following warnings: OnnxExporterWarning: Symbolic function ‘aten::_shape_as_tensor’ already registered for opset 9. Replacing the existing function with new …

Total answers: 1

ONNX Operators for Regex Replacements

ONNX Operators for Regex Replacements Question: QUESTION: How can I use ONNX operators to do string replacements with regular expressions? I am trying to export a Scikit-Learn machine learning pipeline to the Open Neural Network Exchange (ONNX) format. The pipeline takes text as input. Many of the steps that are included in the pipeline are …

Total answers: 1

pybind11 crashes (segmentation fault (core dumped)) while importing ONNX python module

pybind11 crashes (segmentation fault (core dumped)) while importing ONNX python module Question: I am using pybind11 in my C++ code. When I try to import onnx, my code crashes with Segmentation fault (core dumped). However, if I import onnxruntime, everything is well. Of course both onnx and onnxruntime are installed on my system via pip. …

Total answers: 1

Manually run python file with command it runs fine but when i'm using for process its gives error.(composer require symfony/process)

Manually run python file with command it runs fine but when i'm using for process its gives error.(composer require symfony/process) Question: "The command "’python3′ ‘/var/www/html/vino_python/rembg-main/app.py’" failed.nnExit Code: 1(General error)nnWorking directory: /var/www/html/vino_pythonnnOutput:n================nnnError Output:n================nTraceback (most recent call last):n File "/var/www/html/vino_python/rembg-main/app.py", line 1, in n from rembg.bg import removen File "/var/www/html/vino_python/rembg-main/rembg/bg.py", line 7, in n from pymatting.alpha.estimate_alpha_cf import …

Total answers: 1

How to extract layer shape and type from ONNX / PyTorch?

How to extract layer shape and type from ONNX / PyTorch? Question: I would like to ‘translate’ a PyTorch model to another framework (non-tf/keras). I’m trying to take a pytorch model, and automate the translation to the other framework, which contains similar types of layers (i.e. conv2d, dense,…). Is there a way from pytorch directly, …

Total answers: 1

Does converting a seq2seq NLP model to the ONNX format negatively affect its performance?

Does converting a seq2seq NLP model to the ONNX format negatively affect its performance? Question: I was looking at potentially converting an ml NLP model to the ONNX format in order to take advantage of its speed increase (ONNX Runtime). However, I don’t really understand what is fundamentally changed in the new models compared to …

Total answers: 2

how to convert HuggingFace's Seq2seq models to onnx format

how to convert HuggingFace's Seq2seq models to onnx format Question: I am trying to convert the Pegasus newsroom in HuggingFace’s transformers model to the ONNX format. I followed this guide published by Huggingface. After installing the prereqs, I ran this code: !rm -rf onnx/ from pathlib import Path from transformers.convert_graph_to_onnx import convert convert(framework="pt", model="google/pegasus-newsroom", output=Path("onnx/google/pegasus-newsroom.onnx"), …

Total answers: 2

How to resolve the error "cannot import name 'string_int_label_map_pb2' from 'object_detection.protos'"

How to resolve the error "cannot import name 'string_int_label_map_pb2' from 'object_detection.protos'" Question: My friends and I are partaking in a hackathon and are stuck on this one tutorial on training an object detection model: https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html But after three people have tried to follow the above tutorial to the letter, we are all stuck on the …

Total answers: 2

Find input shape from onnx file

Find input shape from onnx file Question: How can I find the input size of an onnx model? I would eventually like to script it from python. With tensorflow I can recover the graph definition, find input candidate nodes from it and then obtain their size. Can I do something similar with ONNX (or even …

Total answers: 3