From a7f40759bbd6d498a8a286f8f9a1d37f5698995d Mon Sep 17 00:00:00 2001 From: David Nabergoj Date: Tue, 7 Nov 2023 09:05:08 -0800 Subject: [PATCH] Update NF examples --- README.md | 4 +++- examples/Computing log determinants.md | 2 +- examples/Modifying architectures.md | 2 +- examples/Training a normalizing flow.md | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6643b23..e3931fd 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ Example use: ```python import torch -from normalizing_flows import RealNVP, Flow +from normalizing_flows import Flow +from normalizing_flows.architectures import RealNVP + torch.manual_seed(0) diff --git a/examples/Computing log determinants.md b/examples/Computing log determinants.md index 17e236c..27a37dc 100644 --- a/examples/Computing log determinants.md +++ b/examples/Computing log determinants.md @@ -7,7 +7,7 @@ The code is as follows: ```python import torch from normalizing_flows import Flow -from normalizing_flows.bijections import RealNVP +from normalizing_flows.architectures import RealNVP torch.manual_seed(0) diff --git a/examples/Modifying architectures.md b/examples/Modifying architectures.md index aec3d68..f8794dc 100644 --- a/examples/Modifying architectures.md +++ b/examples/Modifying architectures.md @@ -4,7 +4,7 @@ We give an example on how to modify a bijection's architecture. We use the Masked Autoregressive Flow (MAF) as an example. We can manually set the number of invertible layers as follows: ```python -from normalizing_flows.bijections import MAF +from normalizing_flows.architectures import MAF event_shape = (10,) flow = MAF(event_shape=event_shape, n_layers=5) diff --git a/examples/Training a normalizing flow.md b/examples/Training a normalizing flow.md index 1078bfc..291b965 100644 --- a/examples/Training a normalizing flow.md +++ b/examples/Training a normalizing flow.md @@ -7,7 +7,7 @@ The code is as follows: ```python import torch from normalizing_flows import Flow -from normalizing_flows.bijections import RealNVP +from normalizing_flows.architectures import RealNVP torch.manual_seed(0)