facebookincubator / flowtorch

This library would form a permanent home for reusable components for deep probabilistic programming. The library would form and harness a community of users and contributors by focusing initially on complete infra and documentation for how to use and create components.
https://flowtorch.ai
MIT License
300 stars 21 forks source link

Additional scale functions for `AffineOp` #109

Closed stefanwebb closed 2 years ago

stefanwebb commented 2 years ago

Motivation

As pointed out in #85, it may be preferable to use softplus rather than exp to calculate the scale parameter of the affine map in bij.ops.Affine.

Changes proposed

Another PR #92 by @vmoens implements softplus, sigmoid, and exp options for the scale parameter - I have factored that out and simplified some of the design in order to make #92 easier for review. softplus is now the default option for Affine

Test Plan

pytest tests/

facebook-github-bot commented 2 years ago

@stefanwebb has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.