<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/probability/blob/v0.25.0/tensorflow_probability/python/experimental/joint_distribution_layers/layers.py#L41-L65) |

Affine layer.

    tfp.experimental.joint_distribution_layers.AffineLayer(
        weights, bias
    )

This represents a linear map: `y = weights @ x + bias`.

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `weights` | A floating point Tensor with shape `[out_units, in_units]`. |
| `bias` | A floating point Tensor with shape `[out_units]`. |

<br />

## Methods

### `__call__`

[View source](https://github.com/tensorflow/probability/blob/v0.25.0/tensorflow_probability/python/experimental/joint_distribution_layers/layers.py#L55-L65)

    __call__(
        x
    )

Applies the layer to an input.

<br />

<br />

<br />

| Args ||
|---|---|
| `x` | A floating point Tensor with shape \[in_units\]. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| `y` | A floating point Tensor with shape \[out_units\]. |

<br />