We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug AffineCoupling
Hello,

There seems to be a bug in [here](https://github.com/pyro-ppl/pyro/blob/dev/pyro/distributions/transforms/affine_coupling.py#L106).

`mean, log_scale = self.arn(x1)`

should probably be

`mean, log_scale = self.hypernet(x1)`

instead, right?

Thanks in advance


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `pyro/distributions/transforms/affine_coupling.py`
Content:
```
1 import torch
2 from torch.distributions import constraints
3 
4 from pyro.distributions.torch_transform import TransformModule
5 from pyro.distributions.util import copy_docs_from
6 from pyro.distributions.transforms.utils import clamp_preserve_gradients
7 from pyro.nn import DenseNN
8 
9 
10 @copy_docs_from(TransformModule)
11 class AffineCoupling(TransformModule):
12     """
13     An implementation of the affine coupling layer of RealNVP (Dinh et al., 2017) that uses the bijective transform,
14 
15         :math:`\\mathbf{y}_{1:d} = \\mathbf{x}_{1:d}`
16         :math:`\\mathbf{y}_{(d+1):D} = \\mu + \\sigma\\odot\\mathbf{x}_{(d+1):D}`
17 
18     where :math:`\\mathbf{x}` are the inputs, :math:`\\mathbf{y}` are the outputs, e.g. :math:`\\mathbf{x}_{1:d}`
19     represents the first :math:`d` elements of the inputs, and :math:`\\mu,\\sigma` are shift and translation
20     parameters calculated as the output of a function inputting only :math:`\\mathbf{x}_{1:d}`.
21 
22     That is, the first :math:`d` components remain unchanged, and the subsequent :math:`D-d` are shifted and
23     translated by a function of the previous components.
24 
25     Together with :class:`~pyro.distributions.TransformedDistribution` this provides a way to create richer
26     variational approximations.
27 
28     Example usage:
29 
30     >>> from pyro.nn import DenseNN
31     >>> input_dim = 10
32     >>> split_dim = 6
33     >>> base_dist = dist.Normal(torch.zeros(input_dim), torch.ones(input_dim))
34     >>> hypernet = DenseNN(split_dim, [10*input_dim], [input_dim-split_dim, input_dim-split_dim])
35     >>> transform = AffineCoupling(split_dim, hypernet)
36     >>> pyro.module("my_transform", transform)  # doctest: +SKIP
37     >>> flow_dist = dist.TransformedDistribution(base_dist, [transform])
38     >>> flow_dist.sample()  # doctest: +SKIP
39         tensor([-0.4071, -0.5030,  0.7924, -0.2366, -0.2387, -0.1417,  0.0868,
40                 0.1389, -0.4629,  0.0986])
41 
42     The inverse of the Bijector is required when, e.g., scoring the log density of a sample with
43     :class:`~pyro.distributions.TransformedDistribution`. This implementation caches the inverse of the Bijector when
44     its forward operation is called, e.g., when sampling from :class:`~pyro.distributions.TransformedDistribution`.
45     However, if the cached value isn't available, either because it was overwritten during sampling a new value or an
46     arbitary value is being scored, it will calculate it manually.
47 
48     This is an operation that scales as O(1), i.e. constant in the input dimension. So in general, it is cheap
49     to sample *and* score (an arbitrary value) from :class:`~pyro.distributions.transforms.AffineCoupling`.
50 
51     :param split_dim: Zero-indexed dimension :math:`d` upon which to perform input/output split for transformation.
52     :type split_dim: int
53     :param hypernet: an autoregressive neural network whose forward call returns a real-valued
54         mean and logit-scale as a tuple. The input should have final dimension split_dim and the output final
55         dimension input_dim-split_dim for each member of the tuple.
56     :type hypernet: callable
57     :param log_scale_min_clip: The minimum value for clipping the log(scale) from the autoregressive NN
58     :type log_scale_min_clip: float
59     :param log_scale_max_clip: The maximum value for clipping the log(scale) from the autoregressive NN
60     :type log_scale_max_clip: float
61 
62     References:
63 
64     Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using Real NVP. ICLR 2017.
65 
66     """
67 
68     domain = constraints.real
69     codomain = constraints.real
70     bijective = True
71     event_dim = 1
72 
73     def __init__(self, split_dim, hypernet, log_scale_min_clip=-5., log_scale_max_clip=3.):
74         super(AffineCoupling, self).__init__(cache_size=1)
75         self.split_dim = split_dim
76         self.hypernet = hypernet
77         self._cached_log_scale = None
78         self.log_scale_min_clip = log_scale_min_clip
79         self.log_scale_max_clip = log_scale_max_clip
80 
81     def _call(self, x):
82         """
83         :param x: the input into the bijection
84         :type x: torch.Tensor
85 
86         Invokes the bijection x=>y; in the prototypical context of a
87         :class:`~pyro.distributions.TransformedDistribution` `x` is a sample from the base distribution (or the output
88         of a previous transform)
89         """
90         x1, x2 = x[..., :self.split_dim], x[..., self.split_dim:]
91 
92         mean, log_scale = self.hypernet(x1)
93         log_scale = clamp_preserve_gradients(log_scale, self.log_scale_min_clip, self.log_scale_max_clip)
94         self._cached_log_scale = log_scale
95 
96         y1 = x1
97         y2 = torch.exp(log_scale) * x2 + mean
98         return torch.cat([y1, y2], dim=-1)
99 
100     def _inverse(self, y):
101         """
102         :param y: the output of the bijection
103         :type y: torch.Tensor
104 
105         Inverts y => x. Uses a previously cached inverse if available, otherwise performs the inversion afresh.
106         """
107         y1, y2 = y[..., :self.split_dim], y[..., self.split_dim:]
108         x1 = y1
109         mean, log_scale = self.arn(x1)
110         log_scale = clamp_preserve_gradients(log_scale, self.log_scale_min_clip, self.log_scale_max_clip)
111         self._cached_log_scale = log_scale
112 
113         x2 = (y2 - mean) * torch.exp(-log_scale)
114         return torch.cat([x1, x2], dim=-1)
115 
116     def log_abs_det_jacobian(self, x, y):
117         """
118         Calculates the elementwise determinant of the log jacobian
119         """
120         x_old, y_old = self._cached_x_y
121         if self._cached_log_scale is not None and x is x_old and y is y_old:
122             log_scale = self._cached_log_scale
123         else:
124             x1 = x[..., :self.split_dim]
125             _, log_scale = self.hypernet(x1)
126             log_scale = clamp_preserve_gradients(log_scale, self.log_scale_min_clip, self.log_scale_max_clip)
127         return log_scale.sum(-1)
128 
129 
130 def affine_coupling(input_dim, hidden_dims=None, split_dim=None, **kwargs):
131     """
132     A helper function to create an :class:`~pyro.distributions.transforms.AffineCoupling` object that takes care of
133     constructing a dense network with the correct input/output dimensions.
134 
135     :param input_dim: Dimension of input variable
136     :type input_dim: int
137     :param hidden_dims: The desired hidden dimensions of the dense network. Defaults
138         to using [10*input_dim]
139     :type hidden_dims: list[int]
140     :param split_dim: The dimension to split the input on for the coupling transform. Defaults
141         to using input_dim // 2
142     :type split_dim: int
143     :param log_scale_min_clip: The minimum value for clipping the log(scale) from the autoregressive NN
144     :type log_scale_min_clip: float
145     :param log_scale_max_clip: The maximum value for clipping the log(scale) from the autoregressive NN
146     :type log_scale_max_clip: float
147 
148     """
149     if split_dim is None:
150         split_dim = input_dim // 2
151     if hidden_dims is None:
152         hidden_dims = [10 * input_dim]
153     hypernet = DenseNN(split_dim, hidden_dims, [input_dim - split_dim, input_dim - split_dim])
154     return AffineCoupling(split_dim, hypernet, **kwargs)
155
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/pyro/distributions/transforms/affine_coupling.py b/pyro/distributions/transforms/affine_coupling.py
--- a/pyro/distributions/transforms/affine_coupling.py
+++ b/pyro/distributions/transforms/affine_coupling.py
@@ -106,7 +106,7 @@
         """
         y1, y2 = y[..., :self.split_dim], y[..., self.split_dim:]
         x1 = y1
-        mean, log_scale = self.arn(x1)
+        mean, log_scale = self.hypernet(x1)
         log_scale = clamp_preserve_gradients(log_scale, self.log_scale_min_clip, self.log_scale_max_clip)
         self._cached_log_scale = log_scale

{"golden_diff": "diff --git a/pyro/distributions/transforms/affine_coupling.py b/pyro/distributions/transforms/affine_coupling.py\n--- a/pyro/distributions/transforms/affine_coupling.py\n+++ b/pyro/distributions/transforms/affine_coupling.py\n@@ -106,7 +106,7 @@\n         \"\"\"\n         y1, y2 = y[..., :self.split_dim], y[..., self.split_dim:]\n         x1 = y1\n-        mean, log_scale = self.arn(x1)\n+        mean, log_scale = self.hypernet(x1)\n         log_scale = clamp_preserve_gradients(log_scale, self.log_scale_min_clip, self.log_scale_max_clip)\n         self._cached_log_scale = log_scale\n", "issue": "Bug AffineCoupling\nHello,\r\n\r\nThere seems to be a bug in [here](https://github.com/pyro-ppl/pyro/blob/dev/pyro/distributions/transforms/affine_coupling.py#L106).\r\n\r\n`mean, log_scale = self.arn(x1)`\r\n\r\nshould probably be\r\n\r\n`mean, log_scale = self.hypernet(x1)`\r\n\r\ninstead, right?\r\n\r\nThanks in advance\r\n\n", "before_files": [{"content": "import torch\nfrom torch.distributions import constraints\n\nfrom pyro.distributions.torch_transform import TransformModule\nfrom pyro.distributions.util import copy_docs_from\nfrom pyro.distributions.transforms.utils import clamp_preserve_gradients\nfrom pyro.nn import DenseNN\n\n\n@copy_docs_from(TransformModule)\nclass AffineCoupling(TransformModule):\n    \"\"\"\n    An implementation of the affine coupling layer of RealNVP (Dinh et al., 2017) that uses the bijective transform,\n\n        :math:`\\\\mathbf{y}_{1:d} = \\\\mathbf{x}_{1:d}`\n        :math:`\\\\mathbf{y}_{(d+1):D} = \\\\mu + \\\\sigma\\\\odot\\\\mathbf{x}_{(d+1):D}`\n\n    where :math:`\\\\mathbf{x}` are the inputs, :math:`\\\\mathbf{y}` are the outputs, e.g. :math:`\\\\mathbf{x}_{1:d}`\n    represents the first :math:`d` elements of the inputs, and :math:`\\\\mu,\\\\sigma` are shift and translation\n    parameters calculated as the output of a function inputting only :math:`\\\\mathbf{x}_{1:d}`.\n\n    That is, the first :math:`d` components remain unchanged, and the subsequent :math:`D-d` are shifted and\n    translated by a function of the previous components.\n\n    Together with :class:`~pyro.distributions.TransformedDistribution` this provides a way to create richer\n    variational approximations.\n\n    Example usage:\n\n    >>> from pyro.nn import DenseNN\n    >>> input_dim = 10\n    >>> split_dim = 6\n    >>> base_dist = dist.Normal(torch.zeros(input_dim), torch.ones(input_dim))\n    >>> hypernet = DenseNN(split_dim, [10*input_dim], [input_dim-split_dim, input_dim-split_dim])\n    >>> transform = AffineCoupling(split_dim, hypernet)\n    >>> pyro.module(\"my_transform\", transform)  # doctest: +SKIP\n    >>> flow_dist = dist.TransformedDistribution(base_dist, [transform])\n    >>> flow_dist.sample()  # doctest: +SKIP\n        tensor([-0.4071, -0.5030,  0.7924, -0.2366, -0.2387, -0.1417,  0.0868,\n                0.1389, -0.4629,  0.0986])\n\n    The inverse of the Bijector is required when, e.g., scoring the log density of a sample with\n    :class:`~pyro.distributions.TransformedDistribution`. This implementation caches the inverse of the Bijector when\n    its forward operation is called, e.g., when sampling from :class:`~pyro.distributions.TransformedDistribution`.\n    However, if the cached value isn't available, either because it was overwritten during sampling a new value or an\n    arbitary value is being scored, it will calculate it manually.\n\n    This is an operation that scales as O(1), i.e. constant in the input dimension. So in general, it is cheap\n    to sample *and* score (an arbitrary value) from :class:`~pyro.distributions.transforms.AffineCoupling`.\n\n    :param split_dim: Zero-indexed dimension :math:`d` upon which to perform input/output split for transformation.\n    :type split_dim: int\n    :param hypernet: an autoregressive neural network whose forward call returns a real-valued\n        mean and logit-scale as a tuple. The input should have final dimension split_dim and the output final\n        dimension input_dim-split_dim for each member of the tuple.\n    :type hypernet: callable\n    :param log_scale_min_clip: The minimum value for clipping the log(scale) from the autoregressive NN\n    :type log_scale_min_clip: float\n    :param log_scale_max_clip: The maximum value for clipping the log(scale) from the autoregressive NN\n    :type log_scale_max_clip: float\n\n    References:\n\n    Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using Real NVP. ICLR 2017.\n\n    \"\"\"\n\n    domain = constraints.real\n    codomain = constraints.real\n    bijective = True\n    event_dim = 1\n\n    def __init__(self, split_dim, hypernet, log_scale_min_clip=-5., log_scale_max_clip=3.):\n        super(AffineCoupling, self).__init__(cache_size=1)\n        self.split_dim = split_dim\n        self.hypernet = hypernet\n        self._cached_log_scale = None\n        self.log_scale_min_clip = log_scale_min_clip\n        self.log_scale_max_clip = log_scale_max_clip\n\n    def _call(self, x):\n        \"\"\"\n        :param x: the input into the bijection\n        :type x: torch.Tensor\n\n        Invokes the bijection x=>y; in the prototypical context of a\n        :class:`~pyro.distributions.TransformedDistribution` `x` is a sample from the base distribution (or the output\n        of a previous transform)\n        \"\"\"\n        x1, x2 = x[..., :self.split_dim], x[..., self.split_dim:]\n\n        mean, log_scale = self.hypernet(x1)\n        log_scale = clamp_preserve_gradients(log_scale, self.log_scale_min_clip, self.log_scale_max_clip)\n        self._cached_log_scale = log_scale\n\n        y1 = x1\n        y2 = torch.exp(log_scale) * x2 + mean\n        return torch.cat([y1, y2], dim=-1)\n\n    def _inverse(self, y):\n        \"\"\"\n        :param y: the output of the bijection\n        :type y: torch.Tensor\n\n        Inverts y => x. Uses a previously cached inverse if available, otherwise performs the inversion afresh.\n        \"\"\"\n        y1, y2 = y[..., :self.split_dim], y[..., self.split_dim:]\n        x1 = y1\n        mean, log_scale = self.arn(x1)\n        log_scale = clamp_preserve_gradients(log_scale, self.log_scale_min_clip, self.log_scale_max_clip)\n        self._cached_log_scale = log_scale\n\n        x2 = (y2 - mean) * torch.exp(-log_scale)\n        return torch.cat([x1, x2], dim=-1)\n\n    def log_abs_det_jacobian(self, x, y):\n        \"\"\"\n        Calculates the elementwise determinant of the log jacobian\n        \"\"\"\n        x_old, y_old = self._cached_x_y\n        if self._cached_log_scale is not None and x is x_old and y is y_old:\n            log_scale = self._cached_log_scale\n        else:\n            x1 = x[..., :self.split_dim]\n            _, log_scale = self.hypernet(x1)\n            log_scale = clamp_preserve_gradients(log_scale, self.log_scale_min_clip, self.log_scale_max_clip)\n        return log_scale.sum(-1)\n\n\ndef affine_coupling(input_dim, hidden_dims=None, split_dim=None, **kwargs):\n    \"\"\"\n    A helper function to create an :class:`~pyro.distributions.transforms.AffineCoupling` object that takes care of\n    constructing a dense network with the correct input/output dimensions.\n\n    :param input_dim: Dimension of input variable\n    :type input_dim: int\n    :param hidden_dims: The desired hidden dimensions of the dense network. Defaults\n        to using [10*input_dim]\n    :type hidden_dims: list[int]\n    :param split_dim: The dimension to split the input on for the coupling transform. Defaults\n        to using input_dim // 2\n    :type split_dim: int\n    :param log_scale_min_clip: The minimum value for clipping the log(scale) from the autoregressive NN\n    :type log_scale_min_clip: float\n    :param log_scale_max_clip: The maximum value for clipping the log(scale) from the autoregressive NN\n    :type log_scale_max_clip: float\n\n    \"\"\"\n    if split_dim is None:\n        split_dim = input_dim // 2\n    if hidden_dims is None:\n        hidden_dims = [10 * input_dim]\n    hypernet = DenseNN(split_dim, hidden_dims, [input_dim - split_dim, input_dim - split_dim])\n    return AffineCoupling(split_dim, hypernet, **kwargs)\n", "path": "pyro/distributions/transforms/affine_coupling.py"}], "after_files": [{"content": "import torch\nfrom torch.distributions import constraints\n\nfrom pyro.distributions.torch_transform import TransformModule\nfrom pyro.distributions.util import copy_docs_from\nfrom pyro.distributions.transforms.utils import clamp_preserve_gradients\nfrom pyro.nn import DenseNN\n\n\n@copy_docs_from(TransformModule)\nclass AffineCoupling(TransformModule):\n    \"\"\"\n    An implementation of the affine coupling layer of RealNVP (Dinh et al., 2017) that uses the bijective transform,\n\n        :math:`\\\\mathbf{y}_{1:d} = \\\\mathbf{x}_{1:d}`\n        :math:`\\\\mathbf{y}_{(d+1):D} = \\\\mu + \\\\sigma\\\\odot\\\\mathbf{x}_{(d+1):D}`\n\n    where :math:`\\\\mathbf{x}` are the inputs, :math:`\\\\mathbf{y}` are the outputs, e.g. :math:`\\\\mathbf{x}_{1:d}`\n    represents the first :math:`d` elements of the inputs, and :math:`\\\\mu,\\\\sigma` are shift and translation\n    parameters calculated as the output of a function inputting only :math:`\\\\mathbf{x}_{1:d}`.\n\n    That is, the first :math:`d` components remain unchanged, and the subsequent :math:`D-d` are shifted and\n    translated by a function of the previous components.\n\n    Together with :class:`~pyro.distributions.TransformedDistribution` this provides a way to create richer\n    variational approximations.\n\n    Example usage:\n\n    >>> from pyro.nn import DenseNN\n    >>> input_dim = 10\n    >>> split_dim = 6\n    >>> base_dist = dist.Normal(torch.zeros(input_dim), torch.ones(input_dim))\n    >>> hypernet = DenseNN(split_dim, [10*input_dim], [input_dim-split_dim, input_dim-split_dim])\n    >>> transform = AffineCoupling(split_dim, hypernet)\n    >>> pyro.module(\"my_transform\", transform)  # doctest: +SKIP\n    >>> flow_dist = dist.TransformedDistribution(base_dist, [transform])\n    >>> flow_dist.sample()  # doctest: +SKIP\n        tensor([-0.4071, -0.5030,  0.7924, -0.2366, -0.2387, -0.1417,  0.0868,\n                0.1389, -0.4629,  0.0986])\n\n    The inverse of the Bijector is required when, e.g., scoring the log density of a sample with\n    :class:`~pyro.distributions.TransformedDistribution`. This implementation caches the inverse of the Bijector when\n    its forward operation is called, e.g., when sampling from :class:`~pyro.distributions.TransformedDistribution`.\n    However, if the cached value isn't available, either because it was overwritten during sampling a new value or an\n    arbitary value is being scored, it will calculate it manually.\n\n    This is an operation that scales as O(1), i.e. constant in the input dimension. So in general, it is cheap\n    to sample *and* score (an arbitrary value) from :class:`~pyro.distributions.transforms.AffineCoupling`.\n\n    :param split_dim: Zero-indexed dimension :math:`d` upon which to perform input/output split for transformation.\n    :type split_dim: int\n    :param hypernet: an autoregressive neural network whose forward call returns a real-valued\n        mean and logit-scale as a tuple. The input should have final dimension split_dim and the output final\n        dimension input_dim-split_dim for each member of the tuple.\n    :type hypernet: callable\n    :param log_scale_min_clip: The minimum value for clipping the log(scale) from the autoregressive NN\n    :type log_scale_min_clip: float\n    :param log_scale_max_clip: The maximum value for clipping the log(scale) from the autoregressive NN\n    :type log_scale_max_clip: float\n\n    References:\n\n    Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using Real NVP. ICLR 2017.\n\n    \"\"\"\n\n    domain = constraints.real\n    codomain = constraints.real\n    bijective = True\n    event_dim = 1\n\n    def __init__(self, split_dim, hypernet, log_scale_min_clip=-5., log_scale_max_clip=3.):\n        super(AffineCoupling, self).__init__(cache_size=1)\n        self.split_dim = split_dim\n        self.hypernet = hypernet\n        self._cached_log_scale = None\n        self.log_scale_min_clip = log_scale_min_clip\n        self.log_scale_max_clip = log_scale_max_clip\n\n    def _call(self, x):\n        \"\"\"\n        :param x: the input into the bijection\n        :type x: torch.Tensor\n\n        Invokes the bijection x=>y; in the prototypical context of a\n        :class:`~pyro.distributions.TransformedDistribution` `x` is a sample from the base distribution (or the output\n        of a previous transform)\n        \"\"\"\n        x1, x2 = x[..., :self.split_dim], x[..., self.split_dim:]\n\n        mean, log_scale = self.hypernet(x1)\n        log_scale = clamp_preserve_gradients(log_scale, self.log_scale_min_clip, self.log_scale_max_clip)\n        self._cached_log_scale = log_scale\n\n        y1 = x1\n        y2 = torch.exp(log_scale) * x2 + mean\n        return torch.cat([y1, y2], dim=-1)\n\n    def _inverse(self, y):\n        \"\"\"\n        :param y: the output of the bijection\n        :type y: torch.Tensor\n\n        Inverts y => x. Uses a previously cached inverse if available, otherwise performs the inversion afresh.\n        \"\"\"\n        y1, y2 = y[..., :self.split_dim], y[..., self.split_dim:]\n        x1 = y1\n        mean, log_scale = self.hypernet(x1)\n        log_scale = clamp_preserve_gradients(log_scale, self.log_scale_min_clip, self.log_scale_max_clip)\n        self._cached_log_scale = log_scale\n\n        x2 = (y2 - mean) * torch.exp(-log_scale)\n        return torch.cat([x1, x2], dim=-1)\n\n    def log_abs_det_jacobian(self, x, y):\n        \"\"\"\n        Calculates the elementwise determinant of the log jacobian\n        \"\"\"\n        x_old, y_old = self._cached_x_y\n        if self._cached_log_scale is not None and x is x_old and y is y_old:\n            log_scale = self._cached_log_scale\n        else:\n            x1 = x[..., :self.split_dim]\n            _, log_scale = self.hypernet(x1)\n            log_scale = clamp_preserve_gradients(log_scale, self.log_scale_min_clip, self.log_scale_max_clip)\n        return log_scale.sum(-1)\n\n\ndef affine_coupling(input_dim, hidden_dims=None, split_dim=None, **kwargs):\n    \"\"\"\n    A helper function to create an :class:`~pyro.distributions.transforms.AffineCoupling` object that takes care of\n    constructing a dense network with the correct input/output dimensions.\n\n    :param input_dim: Dimension of input variable\n    :type input_dim: int\n    :param hidden_dims: The desired hidden dimensions of the dense network. Defaults\n        to using [10*input_dim]\n    :type hidden_dims: list[int]\n    :param split_dim: The dimension to split the input on for the coupling transform. Defaults\n        to using input_dim // 2\n    :type split_dim: int\n    :param log_scale_min_clip: The minimum value for clipping the log(scale) from the autoregressive NN\n    :type log_scale_min_clip: float\n    :param log_scale_max_clip: The maximum value for clipping the log(scale) from the autoregressive NN\n    :type log_scale_max_clip: float\n\n    \"\"\"\n    if split_dim is None:\n        split_dim = input_dim // 2\n    if hidden_dims is None:\n        hidden_dims = [10 * input_dim]\n    hypernet = DenseNN(split_dim, hidden_dims, [input_dim - split_dim, input_dim - split_dim])\n    return AffineCoupling(split_dim, hypernet, **kwargs)\n", "path": "pyro/distributions/transforms/affine_coupling.py"}]}