* Refactor scheme to have quantization mode + add per-block variant
* Add per-block calibration range
* Add per-block qparams compute
* Update book
* Add per-block quantization strategy
* Working per-block tests
* Remove dead code
* Quantize works
* Dequantize works
* TODO
* Add test with block_size > line_size
* Clean up
* Fix clippy + typos
* Fix no-std
* Add might_panic test attribute
* Feature gate might_panic for no-std
* Add from/to data tests + make panic reason more specific
* We forgot default std
* WIP macos debug
* More debug
* Debug
* Fix precision issues
* Debug ci
* More ci
* Clean up ci
* Remove todo comment
* Remove comment
* Add tan operation
Added tan op in FloatTensorOps and QTensorOps, with tests.
Bootstrapped with sin/cos ops, complete backend abstraction.
* update burn-book
* add ONNX support for tan
* add clone_invariance test
* cargo fmt
* add one hot with axis and values function
* update one hot multidimentional function
* implementing on numeric.rs
* update one hot method in numeric
* update one hot function to deal with additional dims
add one hot test
* added tests for one hot
* modify function name
modify format
add tests
* modify to respond to difference between Tensor type and values type
* fix clippy point out and doc test
* do refactoring
modify comments
* update burn book to publish one hot plus method
* modify one_hot_plus to one_hot_fill and args names
* modify one_hot function in int impl and float impl
modify one_hot tests
* modify numeric to clear logic
* modify miscs due to validation, linnter and formatter
* modify documents for tensor api
* modify codes to follow review comments
* modify codes to follow reviews
* modify tests to follow reviews comments
* Improve check message
---------
Co-authored-by: Guillaume Lagrange <lagrange.guillaume.1@gmail.com>
* add fscore, reorganize mod and change error in doc.
* add function args to doc
* fscore to fbetascore and formatting metrics doc in book
* Minor doc fixes
---------
Co-authored-by: Tiago Sanona <tsanona@gmail.com>
Co-authored-by: Guillaume Lagrange <lagrange.guillaume.1@gmail.com>
* create ClassificationInput and ClassificationConfig to share code with RecallMetric. Adapt confusionStats and Precision with generalized code.
* adjust comments in dummy data. implement recall. optimize imports and rename test function properly in precision.
* update book
* rename ClassificationInput, compose ClassificationConfig as classification decision rule and class_reduction
* format
* no glob import
* add comment and fmt
* rename struct slight reorganization add comments
* add documentation to DecisionRule's branches
---------
Co-authored-by: Tiago Sanona <tsanona@gmail.com>
COCO is a popular dataset which defines an own dataset format:
https://cocodataset.org/#format-data
This commit introduces a ImageFolderDataset::new_coco_detection()
function, which expects a path to the JSON annotations file in COCO
format and a path where the actual images are stored.
Note, that while COCO also offers segmentation and pose estimation data,
for now only the import of detection (bounding boxes) data is supported.
* Add option to request manual quit on tui
* Update book
* Update post training implementation for TUI
* Make tui public
* Rename manual_quit to persistent
---------
Co-authored-by: Vincent Masse <you@example.com>
* add int one_hot tests, change tensor creation function formatting in book.
* move swap_dims and transpose to basic ops in book.
---------
Co-authored-by: Tiago Sanona <tsanona@gmail.com>
* Implement confusion matrix and precision, first draft
* Implement confusion matrix
* format :D
* add agg type to cm, reformat debug representation add testing.
improve dummy classification input.
reformat precision and add test with dummy data.
* formating and tiny refactor
* add ClassificationMetric trait, rename variables and types, move test module to lib.rs make precision a classification metric.
* change unwrap to expect
* update book
* remove unused code
* changes to make reusing code easier
* format :D
* change to static data tests
* remove classification metric trait, add auxiliary code for classification input, clarify descriptions, remove dead code, rename some objects
* move classification objects to classification.rs, use rstest, remove approx lib and use tensordata asserts, move aggregate and average functions to ConfusionStats implementation
* review docstring, add top_k for multiclass tasks.
* move class averaging and metric computation to metric implementation, make dummy data more predictable and add tests for top_k > 1
* change struct and var names
* rename params, enforce nonzero for top_k param, optimize one_hot for case num_class = 1, reformat dummy data, make use of derive(new) for metric init.
* add adaptor por classification input, correct one hot function
* define default for ClassReduction, derive new for Precision metric with class_reduction as default and new setter implementation, move NonZerousize boundary to confusion_stats
* expose PrecisionMetric, change metric initialization
* check one_hot input tensor has more than 1 classes and correct it's implementation, deal with classification output with 1 class, make macro average default, expose ClassReduction type and split precision implementations by classification type
* implement adaptor for MultilabelClassificationOutput and ClassificationInput
* change with_top_k to take usize
* Add precision config for binary, multiclass and multilabel
* Fix dummy_classification_input
* make PrecisionMetric public
---------
Co-authored-by: Tiago Sanona <tsanona@gmail.com>
Co-authored-by: Guillaume Lagrange <lagrange.guillaume.1@gmail.com>
* Remove elem type generic from TchTensor
* Remove elem type generic from CandleTensor
* Add float cast tensor op
* Add float tensor cast to book
* Fix candle into_data for int dtypes
* Fix fmt
* Fix clippy
* Add dtype check to test
* Edit type promotion comment
* Clean up candle into_data
* Add candle float cast
* Add ROC AUC metric
* Update burn book
* Change ROC AUC for auroc
* Return 0 if all same target value and Warn
---------
Co-authored-by: Vincent Masse <you@example.com>
* make zero_like, ones_like and full_like general numeric tensor functions,
correct some docs.
* add argtopk
* rename one_hot, correct float one_hot doc in book
* remove argtopk
* correct funtion name in book
---------
Co-authored-by: Tiago Sanona <tsanona@gmail.com>
* Add round, floor, ceil into FloatTensorOps trait; Impl round, floor, ceil for tensor, tch, ndarray, candle; Add tests for autodiff
* Add test for round, floor, ceil in burn tensor backend
* Add test for round, floor, ceil in burn candle backend
* Impl round, floor, ceil for burn fushion backend
* Update burn book
* Fix round gradient != 0 issue
* Add tests for halfway cases
* Use `round_ties_even` for `round` in ndarray backend
* Impl round to even for candle
* Add round, floor, ceil for burn router
* Add round, floor, ceil for jit backend; Upgrade cubecl
* Add round_ties_even for no-std in ndarray backend
* Be explicit about what rounding strategy is used
---------
Co-authored-by: Guillaume Lagrange <lagrange.guillaume.1@gmail.com>
* Add utility methods to split gradients to GradientParams
* Forget about from_segments for now
* ParamId -> u64
* Fix test
* Don't need two lifetimes
* Backwards compatibilty deserialization
* Always serialize same format
* Better compat with old formats
* Fix no_std
* Add a bit to the book
* Move deserialize function, add test
* Tweak test
* Add backward compat for 16-byte uuid
---------
Co-authored-by: Guillaume Lagrange <lagrange.guillaume.1@gmail.com>
* Fix target convert in batcher
* Align hidden code in training and update loss to use config
* Align imports with example
* Remove unused import and fix guide->crate
* Made compatible with thumbv6m-none-eabi
* Added example of no_std on rp2040
* Added documentation on usage in no_std
* Rename rp2040 example and add README.md