2 releases
0.1.5-alpha.0 | Mar 25, 2023 |
---|---|
0.1.4-alpha.0 | Mar 3, 2023 |
#15 in #enforce
1MB
6K
SLoC
caffe2op-enforce
caffe2op-enforce is a Rust crate that provides a mathematical operator used in DSP and machine learning computations. The crate includes the EnforceFinite operator, which is used to enforce finiteness of tensor values during computation.
Note: This crate is currently being translated from C++ to Rust, and some function bodies may still be in the process of translation.
The EnforceFinite operator is typically used in situations where numerical stability is important, such as in deep neural networks. It takes a tensor as input and outputs the same tensor with all non-finite values replaced by a specified value. The EnforceFinite operator can help prevent issues such as NaN (Not a Number) values from propagating through the network and causing numerical instability.
The crate also includes the EnsureClipped operator, which ensures that tensor values are within a specified range by clipping them if they fall outside of that range. This can also help prevent numerical instability in neural networks.
Finally, the CopyWithContext operator is included to allow for copying data between different contexts, such as between CPU and GPU memory.
Overall, caffe2op-enforce provides a set of useful operators for maintaining numerical stability in machine learning and DSP computations.
Dependencies
~37MB
~425K SLoC