From cc607f62762416f711a554e8fb936ef66f2b66cf Mon Sep 17 00:00:00 2001 From: David Nabergoj Date: Mon, 25 Dec 2023 05:24:05 +0100 Subject: [PATCH] Rename files --- .../{conditioners => conditioning}/__init__.py | 0 .../{conditioners => conditioning}/context.py | 0 .../{conditioners => conditioning}/coupling_masks.py | 0 .../transforms.py} | 6 +++--- .../bijections/finite/autoregressive/layers.py | 4 ++-- .../bijections/finite/autoregressive/layers_base.py | 6 +++--- test/test_conditioner_transforms.py | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) rename normalizing_flows/bijections/finite/autoregressive/{conditioners => conditioning}/__init__.py (100%) rename normalizing_flows/bijections/finite/autoregressive/{conditioners => conditioning}/context.py (100%) rename normalizing_flows/bijections/finite/autoregressive/{conditioners => conditioning}/coupling_masks.py (100%) rename normalizing_flows/bijections/finite/autoregressive/{conditioner_transforms.py => conditioning/transforms.py} (98%) diff --git a/normalizing_flows/bijections/finite/autoregressive/conditioners/__init__.py b/normalizing_flows/bijections/finite/autoregressive/conditioning/__init__.py similarity index 100% rename from normalizing_flows/bijections/finite/autoregressive/conditioners/__init__.py rename to normalizing_flows/bijections/finite/autoregressive/conditioning/__init__.py diff --git a/normalizing_flows/bijections/finite/autoregressive/conditioners/context.py b/normalizing_flows/bijections/finite/autoregressive/conditioning/context.py similarity index 100% rename from normalizing_flows/bijections/finite/autoregressive/conditioners/context.py rename to normalizing_flows/bijections/finite/autoregressive/conditioning/context.py diff --git a/normalizing_flows/bijections/finite/autoregressive/conditioners/coupling_masks.py b/normalizing_flows/bijections/finite/autoregressive/conditioning/coupling_masks.py similarity index 100% rename from normalizing_flows/bijections/finite/autoregressive/conditioners/coupling_masks.py rename to normalizing_flows/bijections/finite/autoregressive/conditioning/coupling_masks.py diff --git a/normalizing_flows/bijections/finite/autoregressive/conditioner_transforms.py b/normalizing_flows/bijections/finite/autoregressive/conditioning/transforms.py similarity index 98% rename from normalizing_flows/bijections/finite/autoregressive/conditioner_transforms.py rename to normalizing_flows/bijections/finite/autoregressive/conditioning/transforms.py index 8ff8306..74f3966 100644 --- a/normalizing_flows/bijections/finite/autoregressive/conditioner_transforms.py +++ b/normalizing_flows/bijections/finite/autoregressive/conditioning/transforms.py @@ -1,12 +1,12 @@ import math -from typing import Tuple, Union, Type, List +from typing import Tuple, Union import torch import torch.nn as nn -from normalizing_flows.bijections.finite.autoregressive.conditioners.context import Concatenation, ContextCombiner, \ +from normalizing_flows.bijections.finite.autoregressive.conditioning.context import Concatenation, ContextCombiner, \ Bypass -from normalizing_flows.utils import get_batch_shape, pad_leading_dims +from normalizing_flows.utils import get_batch_shape class ConditionerTransform(nn.Module): diff --git a/normalizing_flows/bijections/finite/autoregressive/layers.py b/normalizing_flows/bijections/finite/autoregressive/layers.py index b340cbe..15b74ff 100644 --- a/normalizing_flows/bijections/finite/autoregressive/layers.py +++ b/normalizing_flows/bijections/finite/autoregressive/layers.py @@ -1,7 +1,7 @@ import torch -from normalizing_flows.bijections.finite.autoregressive.conditioner_transforms import FeedForward -from normalizing_flows.bijections.finite.autoregressive.conditioners.coupling_masks import HalfSplit +from normalizing_flows.bijections.finite.autoregressive.conditioning.transforms import FeedForward +from normalizing_flows.bijections.finite.autoregressive.conditioning.coupling_masks import HalfSplit from normalizing_flows.bijections.finite.autoregressive.layers_base import MaskedAutoregressiveBijection, \ InverseMaskedAutoregressiveBijection, ElementwiseBijection, CouplingBijection from normalizing_flows.bijections.finite.autoregressive.transformers.linear.affine import Scale, Affine, Shift diff --git a/normalizing_flows/bijections/finite/autoregressive/layers_base.py b/normalizing_flows/bijections/finite/autoregressive/layers_base.py index afc7a00..6562dda 100644 --- a/normalizing_flows/bijections/finite/autoregressive/layers_base.py +++ b/normalizing_flows/bijections/finite/autoregressive/layers_base.py @@ -1,11 +1,11 @@ -from typing import Tuple, Optional, Union +from typing import Tuple, Union import torch import torch.nn as nn -from normalizing_flows.bijections.finite.autoregressive.conditioner_transforms import ConditionerTransform, Constant, \ +from normalizing_flows.bijections.finite.autoregressive.conditioning.transforms import ConditionerTransform, \ MADE -from normalizing_flows.bijections.finite.autoregressive.conditioners.coupling_masks import CouplingMask +from normalizing_flows.bijections.finite.autoregressive.conditioning.coupling_masks import CouplingMask from normalizing_flows.bijections.finite.autoregressive.transformers.base import TensorTransformer, ScalarTransformer from normalizing_flows.bijections.base import Bijection from normalizing_flows.utils import flatten_event, unflatten_event, get_batch_shape diff --git a/test/test_conditioner_transforms.py b/test/test_conditioner_transforms.py index 79ac5fc..551e70c 100644 --- a/test/test_conditioner_transforms.py +++ b/test/test_conditioner_transforms.py @@ -1,8 +1,8 @@ import pytest import torch -from normalizing_flows.bijections.finite.autoregressive.conditioner_transforms import ( - MADE, FeedForward, LinearMADE, ResidualFeedForward, Constant, Linear, ConditionerTransform +from normalizing_flows.bijections.finite.autoregressive.conditioning.transforms import ( + MADE, FeedForward, LinearMADE, ResidualFeedForward, Linear, ConditionerTransform ) from test.constants import __test_constants