{"categories":[{"label":"Artificial Intelligence","url":"https://skillfed.io/packages/category/scientific-engineering-artificial-intelligence/11"}],"enrichment":{"capability":"Modifies ONNX model files to initialize or replace their batch size dimension with a specified value, useful for making models accept variable or fixed batch sizes.","skillfed_tags":["onnx-tools","model-optimization"],"use_cases":["Convert a fixed-batch ONNX model (e.g., batch size 1) to accept variable batch sizes for deployment.","Prepare ONNX models for TensorRT or other inference engines that require explicit batch dimension naming.","Batch-process multiple ONNX files to standardize their batch dimension representation before model serving.","Replace hardcoded batch dimensions with symbolic names for dynamic batching in production inference pipelines."],"what_it_does":"sbi4onnx is a lightweight command-line and Python tool for modifying ONNX neural network models to change their batch size dimension. It reads an ONNX file, replaces the batch dimension (typically the first dimension) with a string you specify\u2014such as 'N' for a named dynamic dimension, '-1' for a wildcard, or any custom identifier\u2014and writes the modified model to disk. The tool optionally runs ONNX simplification on the result to clean up redundant operations.\n\nThe package is designed for a narrow, specific task: preparing pre-trained models for inference frameworks that require explicit batch size handling. It is not a general ONNX manipulation library. The documentation warns that it may fail on models with complex internal structures, particularly those containing Reshape operations that already have undefined dimensions or Gemm layers with non-unit batch outputs. For such cases, the author recommends pre-processing with a companion tool (sam4onnx) to fix problematic dimensions first.","worth_installing":"Yes, if you need to modify ONNX batch dimensions and your models have straightforward graph structures. The tool is lightweight, dependency-free at runtime, and MIT-licensed. However, maintenance is dormant (last update 808 days ago), so expect no active bug fixes or feature development. Test thoroughly on your specific models first, as the tool explicitly does not handle complex Reshape or Gemm patterns\u2014if your model fails, you may need to preprocess it with other tools or edit the ONNX file manually."},"id":"sbi4onnx","links":{"html":"https://skillfed.io/packages/sbi4onnx","md":"https://skillfed.io/packages/sbi4onnx.md","pypi":"https://pypi.org/project/sbi4onnx/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2024-05-28","license_spdx":null,"license_treatment":"permissive","name":"sbi4onnx","python_support":"supports_current","summary":"A very simple script that only initializes the batch size of ONNX. Simple Batchsize Initialization for ONNX."},"popularity":{"monthly_downloads":82716,"position":14140,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.0.7"}
