Skip to main content

Simple node deletion tool for onnx.

Project description

snd4onnx

Simple node deletion tool for onnx. I only test very miscellaneous and limited patterns as a hobby. There are probably a large number of bugs. Pull requests are welcome.

Downloads GitHub PyPI

1. Setup

### option
$ echo export PATH="~/.local/bin:$PATH" >> ~/.bashrc \
&& source ~/.bashrc

### run
$ pip install -U onnx \
&& python3 -m pip install -U onnx_graphsurgeon --index-url https://pypi.ngc.nvidia.com \
&& pip install -U snd4onnx

2. Usage

$ snd4onnx -h

usage: snd4onnx [-h] onnx_file_path remove_node_names

positional arguments:
  onnx_file_path     Input onnx file path.
  remove_node_names  ONNX node name to be deleted. Comma delimited.

optional arguments:
  -h, --help         show this help message and exit

3. Execution

$ snd4onnx input.onnx node_name_a

4. Sample

4-1. sample.1

Before After
test1 onnx test1_removed onnx

4-2. sample.2

Before After
test3 onnx test3_removed onnx

4-3. sample.3

Before After
test5 onnx test5_removed onnx

4-4. sample.4

Before After
test7 onnx test7_removed onnx

4-5. sample.5

Before After
test8 onnx test8_removed onnx

5. Reference

  1. https://docs.nvidia.com/deeplearning/tensorrt/onnx-graphsurgeon/docs/index.html
  2. https://github.com/NVIDIA/TensorRT/tree/main/tools/onnx-graphsurgeon
  3. https://github.com/PINTO0309/scs4onnx
  4. https://github.com/PINTO0309/sne4onnx
  5. https://github.com/PINTO0309/snc4onnx

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snd4onnx-1.0.0.tar.gz (7.3 kB view hashes)

Uploaded source

Built Distribution

snd4onnx-1.0.0-py3-none-any.whl (7.7 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page