* add random normal like python code to generate onnx model
* add random normal like node
* modify onnx burn to add new op
* add test on test onnx
* revert commentouts
* fix review points to respond to dynamically shape
* add onnx op of random uniform like
* fix formats
* add random normal like python code to generate onnx model
* add random normal like node
* modify onnx burn to add new op
* add test on test onnx
* revert commentouts
* fix review points to respond to dynamically shape
* add python, onnx model, burn/node for conv_transpose1d
* modify supported-onnx-ops.md about convtranspose1d
* add conv_transpose1d function in op_configuration and to_burn
* add test and modify dim_inference
* apply cargo fmt to formatting
* fix reviewer point-outs by adding symetry checks for padding in 2d,3d
* fix pads initilization and check ways
* add trilu.py and onnx model for operators
* add node/trilu.rs under burn-import and modify related files
* update trilu codegen tests
* add op_configuration and to_burn rust files
* update how to get diagonal value from nodes argument
* add trilu tests in test_onnx.rs
* update files to follow clippy and format rules
* add tests for both of upper and lower to follow review comment
* delete onnx model of trilu.onnx since upper and lower models are added
* Fix ONNX where op dim_inference for scalar inputs
* Rewrite ONNX Where codegen to support scalars
* ONNX Where: Add tests for all_scalar inputs
---------
Co-authored-by: Guillaume Lagrange <lagrange.guillaume.1@gmail.com>
- Calculate result of broadcasting in dim_inference
- keep Shape info when converting from Argument to TensorType
- Remove a few sources of Dim = 0 Tensors, create Scalars instead
- Clean up dim_inference a bit
* implemented muli-dim index for GatherNode
The `NodeCodegen` impl for `GatherNode` now performs gather in complete
accordance with the ONNX Gather spec.
- a `gather` function was added to the gather.rs file
- `gather()` is now called within the codegen instead of `tensor.select()`
- a test with two test cases have been added
- test axes 0 and 1
- both use 2D index tensors
* add gather_onnx to numeric api
Added int and float implementations of gather to the burn-tensor numeric
api:
- named the methods `gather_onnx` to not be confused with the current
`gather`
- these implementations follow the `Gather` ONNX spec
Updated the gather*.py variants and their onnx outputs
* modified files didn't end up in last commit
* tests passing for onnx gather
The implementation of gather for the ONNX `Gather` spec is tentatively
complete:
- py test models are updated
- onnx_tests are modified and passing: `gather`, `gather_scalar`, and
`gather_shape`
- node/gather tests are passing
NOTE: The two additional tests in crates/burn-import/src/burn/node/gather.rs that test
the actual functionality of gather are likely to be deleted, since they
are redundant to the tests in
crates/burn-import/onnx-tests/tests/onnx_tests.rs.
* inlined onnx gather within codegen
* rm gather_onnx from public api; rm unnecessary tests
* add comments to gather py models
* some codegen changes; formatting to appease run-checks
- Some necessary changes and improvements to the codegen inlined code
after translating from public api (removed in previous commit).
- Changed some formatting that run-checks complained about.
* simplify gather codegen; include 1d and 2d onnx tests
Modified the `Gather` codegen per requested changes:
- combined match statements on index
- remove use of `alloc::vec::Vec`
- use map -> collect instead of procedural
- include a 1d index gather onnx test
- remove superflous tests
* delete unused gather.onnx
* Add Hard Sigmoid activation function
* Add ONNX import conversion for HardSigmoid
* Update supported operators list
* Update book
* Make test comparison approximate to eliminate precision issues
* Add burn-candle test
* Fix name in E2E test generator
* Implement ONNX pad
* ONNX pad arguments fix
pad now requires 2 or more arguments
if the third argument is not given, it will default to 0
* fixing bug in input len fix
* change panic comment
Change panic comment from needing two inputs. This comes from the fact that the ONNX spec requires two necessary inputs but could have more two more optional argument.
---------
Co-authored-by: JC <you@example.com>
Co-authored-by: mepatrick73 <pameu17@ulaval.ca>
* Remove panic for squeeze when more than one axis is specified
* Remove extra Model()
* Change script to squeeze all singleton dimensions
* Revert change since burn requires axes to be specified
* Fix input tensor
* Try updating ONNX files again
* Add script for testing multiple axes along with new ONNX file
* Update squeeze.py comments
* Add squeeze_multiple model to tests
* Fix dim_inference
* Feat: burn-import implement ONNX ConstantOfShape
* Introduce shape type and use in ConstantOfShape and Shape
* Add tests for bool and int tensors for ConstantOfShape
* Fix ONNX test generation
* Undo comment
---------
Co-authored-by: Dilshod Tadjibaev <939125+antimora@users.noreply.github.com>
* Implement 3D and transposed 3D convolutions.
* Merge changes from onnx-ir #1921 pr
---------
Co-authored-by: Dilshod Tadjibaev <939125+antimora@users.noreply.github.com>
* separating onnx parsing from burn-import
* ran clippy and cargo-fmt
* removed unused deps from onnx-ir
* fixed clippy warnings that were causing run-checks to fail
* removed dead code
* removed unused dependencies from burn-import
* updated contributor-book, updated publish.yml, added readme
* update cargo lock
* formatted md document with prettier, rephrased sentence
* missed the errors with reduce_prod_conversion during merge
* formatted onnx-to-burn-conversion-tool.md, forgot to save