Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsKue committed May 31, 2024
1 parent 4500de2 commit 493c522
Show file tree
Hide file tree
Showing 12 changed files with 214 additions and 784 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
)

from bayesflow.experimental.types import Tensor
from bayesflow.experimental.utils import find_network
from ..invertible_layer import InvertibleLayer
from ..subnets import find_subnet
from ..transforms import find_transform


Expand All @@ -17,10 +17,10 @@ class SingleCoupling(InvertibleLayer):
Subnet output tensors are linearly mapped to the correct dimension.
"""
def __init__(self, subnet: str = "resnet", transform: str = "affine", **kwargs):
def __init__(self, network: str = "resnet", transform: str = "affine", **kwargs):
super().__init__(**kwargs)
self.dense = keras.layers.Dense(None, kernel_initializer="zeros", bias_initializer="zeros")
self.subnet = find_subnet(subnet)
self.network = find_network(network)
self.transform = find_transform(transform)

# noinspection PyMethodOverriding
Expand Down Expand Up @@ -53,7 +53,7 @@ def get_parameters(self, x, conditions: any = None) -> dict[str, Tensor]:
if keras.ops.is_tensor(conditions):
x = keras.ops.concatenate([x, conditions], axis=-1)

parameters = self.dense(self.subnet(x))
parameters = self.dense(self.network(x))
parameters = self.transform.split_parameters(parameters)
parameters = self.transform.constrain_parameters(parameters)

Expand Down
23 changes: 0 additions & 23 deletions bayesflow/experimental/networks/coupling_flow/subnets/__init__.py

This file was deleted.

Loading

0 comments on commit 493c522

Please sign in to comment.