Tensorstate

Latest version: v0.4.0

Safety actively analyzes 681775 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.4.0

0.3.0

The biggest change in this version comes with support for CuPy, and uses CuPy to accelerate TensorState functions when CuPy is present and the TensorFlow/PyTorch tensor is located on the GPU.

In addition, this release adds support for Python 3.9, increases the minimum TensorFlow requirement to 2.2, and added support for n-dimensional tensors in PyTorch (permitting proper capture of statespace in fully connected/Linear layers).

0.2.4

This patch fixes a bug in `_compress_tensor_ps`, which is a compile function underlying `tensorstate.compress_tensor`. The bug caused positive 0 floating point values to be interpreted as a firing neuron. This is problematic for interpreting neural networks because some activation functions such as ReLU evaluate to 0, which should be interpreted as non-firing.

0.2.3

This release fixes the AbstractStateCapture.state_ids bug where incorrect state ids were returned, and also fixes a bug in _lex_sort where an error is thrown if the number of unique states is equal to the total number of states.

In addition, some updates to the documentation were made to include the MacOS wheels that are being built and instructions on how to build from source.

0.2.2

0.2.1

This release features two important functions: state space decompression and the ability to reset state layers/hooks.

In version 0.1.x, all state space information was stored in bit compressed zarr arrays. A unique state identifier could be obtained by calling the `StateCapture.state_ids` function, but this consisted of the conversion of the bit compressed state space into a byte array. To make it easier to analyze a state, a new `decompress_states` function was added that transforms the compressed state into a numpy boolean array where columns contain boolean values for the firing state of a neuron and rows contain states. In addition, a new property, `StateCapture.states`, was added to streamline the process. See the documentation for more info.

To permit tracking of state space during training, the `reset_efficiency_model` method was tested and various changes to how state space stored and reset were made. Now, it is possible to call this method to clear the state space, permitting analyzing different data sets within the same session.

In addition to these changes, additional optimizations were made to the compile code that makes capturing and processing state space information 4-10x faster.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.