Skip to content

Split Bijector#103

Open
vmoens wants to merge 31 commits into
mainfrom
split_bijector
Open

Split Bijector#103
vmoens wants to merge 31 commits into
mainfrom
split_bijector

Conversation

@vmoens
Copy link
Copy Markdown
Contributor

@vmoens vmoens commented Apr 21, 2022

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

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • The title of my pull request is a short description of the requested changes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 21, 2022
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 22, 2022

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.43%. Comparing base (13cf226) to head (7b9db0a).
⚠️ Report is 18 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

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              
Flag Coverage Δ
unittests 98.43% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vmoens vmoens linked an issue Apr 22, 2022 that may be closed by this pull request
# Conflicts:
#	flowtorch/bijectors/base.py
#	flowtorch/bijectors/compose.py
#	flowtorch/bijectors/ops/spline.py
#	tests/test_bijector.py
vmoens added 4 commits April 26, 2022 16:26
# Conflicts:
#	flowtorch/bijectors/coupling.py
#	flowtorch/bijectors/ops/affine.py
#	flowtorch/parameters/__init__.py
#	flowtorch/parameters/base.py
#	tests/test_bijector.py
@facebook-github-bot
Copy link
Copy Markdown
Contributor

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.

Process

In 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 CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Split bijector

3 participants