Split Bijector#103
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #103 +/- ##
==========================================
+ Coverage 98.39% 98.43% +0.03%
==========================================
Files 6 6
Lines 249 255 +6
==========================================
+ Hits 245 251 +6
Misses 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
# Conflicts: # flowtorch/bijectors/base.py # flowtorch/bijectors/compose.py # flowtorch/bijectors/ops/spline.py # tests/test_bijector.py
# Conflicts: # flowtorch/bijectors/coupling.py # flowtorch/bijectors/ops/affine.py # flowtorch/parameters/__init__.py # flowtorch/parameters/base.py # tests/test_bijector.py
|
Hi @vmoens! Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours needs attention. You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
Motivation
We introduce the Split Bijector, which allows to split a tensor in half, process one half through a sequence of transformations and normalize the other.
Changes proposed
The new class first splits the tensor, then passes the outputs to the
_param_fnand then to the transform itself.The introduction of a
_forward_pre_opsand_inverse_pre_opsmethods is necessary as, in the inverse case, we need to first pass the input through the transform inverse to then pass it through the convolutional layer that will give us the normalizing constants. This breaks the_param_fb(...)->_inverse(...)logic, as we need to do something before_param_fn. As this might be the case for the forward pass too, we introduced a similar_forward_pre_opsmethod.Types of changes
Checklist