Skip to content

declearn v2.1.0

Choose a tag to compare

@pandrey-fr pandrey-fr released this 01 Sep 09:52
· 1020 commits to develop since this release
1d6f499

Release date: 02/03/2023

Release Highlights

Add proper GPU support and device-placement policy utils.

  • Add device-placement policy utils: declearn.utils.DevicePolicy, declearn.utils.get_policy and declearn.utils.set_policy.

  • Implement device-placement support in TorchModel, TorchVector, TensorflowModel and TensorflowVector, according to shared API principles (some of which are abstracted into Model).

  • Add tests for these features, and automatic running of unit tests on both CPU and GPU when possible (otherwise, run on CPU only).

Add framework-specific TensorflowOptiModule and TorchOptiModule.

  • Enable wrapping framework-specific optimizer objects into a plug-in that may be used within a declearn Optimizer and jointly with any combination of framework-agnostic plug-ins.

  • Add functional tests that verify our implementations of the Adam, Adagrad and RMSprop optimizers are equivalent to these of the Tensorflow and Torch frameworks.

Add declearn.metrics.RSquared metric to compute a regression's R^2.

Fix handling of frozen weights in TensorflowModel and TorchModel.

  • Add trainable: bool=False parameter to Model.get_weights and Model.set_weights to enable excluding frozen weights from I/O.

  • Use Model.get_weights(trainable=True) in Optimizer methods, enabling to use loss-regularization Regularizer plug-ins and weight decay with models that have some frozen weights.

  • Use Model.set_weights(trainable=True) and its counterpart to remove some unrequired communications and server-side aggregator and optimizer computations.

Fix handling of tf.IndexedSlices structures in TensorflowVector.

  • Avoid the (mostly silent, depending on tensorflow version) conversion of tf.IndexedSlices row-sparse gradients to a dense tensor every time it can be avoided.

  • Warn about that conversion when it happens (unless the contexts is known to require it, e.g. as part of noise-addition optimodules).

Full Release Notes

Release notes are available on our website and on the source GitLab repo.