* Move QuantizationScheme to burn-tensor
* Refactor QuantizedTensorPrimitive to include the quantization strategy
* Fix QFloat tensor data display
* Refactor quantization methods to use scheme and qparams (on backend device)
* Fix clippy
* Fix fmt
* Add qtensor primitive tests
* Add QuantizationBackend, QTensorOps and QTensor
* Refactor QTensorOps as part of Backend trait
* Add tensor dequantize, QFloat dtype and default affine/symmetric quant
* Add ndarray default quantization implementation
* Fix clippy
* Add rayon parallel iter
* Add quantization operations to book
* Add q_shape and q_device ops to avoid converting the tensor just to get attributes
* Implement autodiff grad ops
* Mark autodiff todo for QAT
* Remove note
* Add q_inner and q_from_inner
* Implement 3D and transposed 3D convolutions.
* Merge changes from onnx-ir #1921 pr
---------
Co-authored-by: Dilshod Tadjibaev <939125+antimora@users.noreply.github.com>
* Move distribution to module
* Add new TensorData with serialization support
* Implement display and from for TensorData
* Add missing Cargo.lock
* Add missing bytemuck feature
* Add zeros, ones, full and random TensorData methods
* Refactor Data -> TensorData usage
* Fix tests
Since TensorData is not generic over the element type anymore no type inference can be done by the compiler. We must explicitly cast the expected results to the expected backend type.
* Remove commented line
* Fix import
* Add record-backward-compat
* Remove dim const generic from TensorData
* Support NestedValue de/serialization with TensorData
* Fix burn-jit tests
* Remove eprinln
* Refactor onnx import to use TensorData
* Fix tch from_data
* Fix nested value serialization for u8
* Fix missing import
* Fix reduce min onnx test
* Fix deprecated attribute
* Remove shape getter
* Remove strict assert in tests
* Add tensor data as_bytes
* Add tensor check for rank mismatch
* Fix typo (dimensions plural)
* Fix error message
* Update book examples with from_data and fix Display impl for TensorData
* Add deprecation note
In the Record page, there are 4 places where "Pack" is written as
"Park." Also, the fix makes them the same as the official name, which
has no space and is in CamelCase.
Co-authored-by: towerpark <t56ouhw1d@mozmail.com>
* Adds remainder ops implementation for Tensor.
* Adds test for % operator.
* Add remainder and % operator entry in tensor.md
---------
Co-authored-by: Jonas Kantic <jk.mail@posteo.net>
* #1747
Upgrade Rust dependencies
* Revert upgrade for tch
The update of tch on windows gives an error:
INTEL MKL ERROR: The specified module could not be found. mkl_vml_avx2.1.dll.
Intel MKL FATAL ERROR: cannot load mkl_vml_avx2.1.dll or mkl_vml_def.1.dll.
* Keep only .cargo/config.toml file which works with rust > 1.75
---------
Co-authored-by: Sylvain Benner <sylvain@benner.online>
* resolve conflict
* move `gate_product` to `GateController`
* BiLstm needs to use its own initializer when init
* resolve conflicts
* add some comments
* improve doc
* correct the description of GateController
* fix fmt
* add `LstmState`
* add test for state
* set batch 2 in bilstm test
* resolve conflict
* fix
* fix doc
* change the batch size back to 1
* change the batch size back to 1
* modify docstring; delete dead comment
* Add training report summary
* Fix LossMetric batch size state
* Add NumericEntry de/serialize
* Fix clippy suggestion
* Compact recorder does not use compression (anymore)
* Add learner summary expected results tests
* Add summary to learner builder and automatically display in fit
- Add LearnerSummaryConfig
- Keep track of summary metrics names
- Add model field when displaying from learner.fit()
* Fixes to code examples in section 5.2
* A more generic way to get a device for code examples in Burn book section 5.2
* Change run-checks instruction + fix comment spacing
---------
Co-authored-by: hrishim <hrishim@gail.com>
Co-authored-by: Guillaume Lagrange <lagrange.guillaume.1@gmail.com>
* refactor execute_dynamic into Execution
* minor change
* extension cfg
* jitkernel and sourcekernel
* add todo statement
* cleanup and docs
* update book
* fix server dependancy on compiler
* refactor into shader information
* refactor to compile shader once
* clippy
* clippy
* clippy
* fix doc
* fix doc
* fmt
* rename feature flag
* refactor
* All broked
* compile at the right time
* todo done
* all dynamic
* all dynamic in template too
* fmt
* fix ci
---------
Co-authored-by: nathaniel <nathaniel.simard.42@gmail.com>
* Implement LeakyReLu
* Cargo fmt
* Apply suggestions
* cargo fmt
* Use float_mul_scalar
* Should be grad
* Add to books module
* Move test files
* Update leaky relu to use activation function
* Update tensor.md
* Fix failing test due to approx
* Add back the function comment
* Fix comment per PR feedback
---------
Co-authored-by: Dilshod Tadjibaev <939125+antimora@users.noreply.github.com>
* Initial padding approach
Create padding implementation for the last two dimensions of Float and Int Tensors.
Create PadMode Enum, allowing Constant padding.
Create Padding Struct with Uniform, Asymmetric, height, and width implementations.
Create tests for the padding implementation.
* Update padding.rs
remove unneeded import
* Update from Merge
Use crate Element
Swap from old from_data() to new from_data_devauto()
* Formatting Changes
Formatting changes from cargo fmt --all
* Additional Format Change
One more format change that cargo fmt didn't get the first time.
* Changes to Example
Modify Example to ensure it works.
* modify naming
better names for impl / input variables.
* Modify API
- Change Padding to PadSize.
- integrate padding value into PadMode.
- update tests and examples.
* Comments and print
Improve comments+naming and remove println
* Pad Fixes
Moved pad to numeric
Simplified PadMode Element
updated tensor creations
fixed doc example
* Fix test location
* Simplified pad API
* Fix for failed unit tests
* Remove bool_full
* Rename `pads` to `padding`
---------
Co-authored-by: Dilshod Tadjibaev <939125+antimora@users.noreply.github.com>