Skip to content
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

Fix deprecation warning #13

Merged
merged 1 commit into from Nov 8, 2022

Conversation

timothygebhard
Copy link
Contributor

Fixes the deprecation warning documented in #12.


Sanity check: Running this before the change:

import normflows as nf
import torch

torch.manual_seed(42)

flow = nf.NormalizingFlow(
    nf.distributions.DiagGaussian(1, trainable=False),
    [
        nf.flows.AutoregressiveRationalQuadraticSpline(1, 1, 1),
        nf.flows.LULinearPermute(1)
    ]
)

with torch.no_grad():
    samples_flow, _ = flow.sample(4)

print(samples_flow)

gives:

tensor([[0.4528],
        [0.6410],
        [0.5200],
        [0.5567]])

After the change, the output stays the same.

Replace `triangular_solve()` with `linalg.solve_triangular()` to
fix the deprecation warning. See also:

VincentStimper#12
@VincentStimper VincentStimper merged commit 1557388 into VincentStimper:master Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants