burn/crates/burn-import
Mathias Insley 37822fdb51
Feat/Split ONNX Import (#2568)
* Add a Split node to burn-import

* Register operation in to_burn

* Create Split config function

* Dimension inference for split outputs

* Remove unnecessary f-strings from squeeze

* ONNX file for Split and scipt that generates it

* Add Split node to name function in Node impl

* Update supported onnx ops list

* Add codegen test

* Include split onnx model in build

* Split values should be taken from inputs, make sure only num_outputs or split is provided

* Codegen should make a Vec<Tensor<B, D>>

* Fix up split codegen

* Remove panic if split is not provided

* Add basic split test

* Keep the number of output tensor sizes fixed

* Clippy fixes

* Update supported ops list

* Cleanup build errors

* Update onnx test now that return is tuple of static size

* Potential workaround to constant int node

* Change num_outputs to split_size in SplitConfig to follow burn implementation

* Intraconvert from ONNX graph node to SplitConfig properly

* Revert attempt at sidestepping constant int node issue

* Copy override logic from @jameshiew

* Fill in placeholder docstrings

* Remove initializer helpers

* Move code for generating uninitialized tensors into burn-import

---------

Co-authored-by: James Hiew <james@hiew.net>
2025-02-17 10:28:36 -05:00
..
onnx-tests Feat/Split ONNX Import (#2568) 2025-02-17 10:28:36 -05:00
pytorch-tests Don't mention a fixed candle bug (#2689) 2025-01-13 09:10:07 -05:00
src Feat/Split ONNX Import (#2568) 2025-02-17 10:28:36 -05:00
Cargo.toml Fix optional burn-import dep + impl module types for isize (#2774) 2025-02-04 15:28:05 -05:00
DEVELOPMENT.md Add subtract tensor from scalar for ONNX sub op (#1964) 2024-07-05 13:52:02 -05:00
LICENSE-APACHE Update licenses symlinks (#1613) 2024-04-12 14:43:58 -04:00
LICENSE-MIT Update licenses symlinks (#1613) 2024-04-12 14:43:58 -04:00
README.md modify url link to book (#2327) 2024-10-02 08:32:27 -04:00
SUPPORTED-ONNX-OPS.md Feat/Split ONNX Import (#2568) 2025-02-17 10:28:36 -05:00

README.md

Importing Models

The Burn project supports the import of models from various frameworks, emphasizing efficiency and compatibility. Currently, it handles two primary model formats:

  1. ONNX: Facilitates direct import, ensuring the model's performance and structure are maintained.

  2. PyTorch: Enables the loading of PyTorch model weights into Burns native model architecture, ensuring seamless integration.

Contribution

Interested in contributing to burn-import? Check out our development guide for more information.