{"library":"sne4onnx","title":"sne4onnx","type":"library","description":"A lightweight tool for extracting subgraphs (model slicing) from ONNX models. Useful when onnx-simplifier exceeds the 2GB Protocol Buffers file size limit, or to split models into arbitrary sizes. Current version 2.0.1, released June 2024. Development is active.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install sne4onnx"],"cli":{"name":"sne4onnx","version":"Traceback (most recent call last):"}},"imports":["import sne4onnx"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/PINTO0309/sne4onnx","docs":null,"changelog":null,"pypi":"https://pypi.org/project/sne4onnx/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"import onnx\nfrom sne4onnx import extraction\n\n# Load an ONNX model\nmodel = onnx.load('model.onnx')\n\n# Define input and output operation names for the subgraph\ninput_names = ['input']  # name of the input tensor or node\noutput_names = ['output']  # name of the output tensor or node\n\n# Extract the subgraph\nnew_model = extraction(model, input_names, output_names)\n\n# Save the extracted model\nonnx.save(new_model, 'extracted.onnx')","lang":"python","description":"Extract a subgraph from an ONNX model by specifying input and output operation names.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}