-
Notifications
You must be signed in to change notification settings - Fork 21
Split Bijector #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Split Bijector #103
Conversation
Codecov Report
@@ Coverage Diff @@
## main #103 +/- ##
==========================================
+ Coverage 98.25% 98.29% +0.04%
==========================================
Files 6 6
Lines 229 235 +6
==========================================
+ Hits 225 231 +6
Misses 4 4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
# 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_fn
and then to the transform itself.The introduction of a
_forward_pre_ops
and_inverse_pre_ops
methods 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_ops
method.Types of changes
Checklist