<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/layers/util.py#L124-L199) |

Creates a function to build Normal distributions with trainable params.

#### View aliases


**Main aliases**

[`tfp.layers.util.default_mean_field_normal_fn`](https://www.tensorflow.org/probability/api_docs/python/tfp/layers/default_mean_field_normal_fn)

<br />

    tfp.layers.default_mean_field_normal_fn(
        is_singular=False,
        loc_initializer=tf_keras.initializers.RandomNormal(stddev=0.1),
        untransformed_scale_initializer=tf_keras.initializers.RandomNormal(mean=-3.0, stddev=0.1),
        loc_regularizer=None,
        untransformed_scale_regularizer=None,
        loc_constraint=None,
        untransformed_scale_constraint=None
    )

This function produces a closure which produces `tfd.Normal`
parameterized by a `loc` and `scale` each created using `tf.get_variable`.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `is_singular` | Python `bool` if `True`, forces the special case limit of `scale->0`, i.e., a `Deterministic` distribution. |
| `loc_initializer` | Initializer function for the `loc` parameters. The default is [`tf.random_normal_initializer(mean=0., stddev=0.1)`](https://www.tensorflow.org/api_docs/python/tf/random_normal_initializer). |
| `untransformed_scale_initializer` | Initializer function for the `scale` parameters. Default value: `tf.random_normal_initializer(mean=-3., stddev=0.1)`. This implies the softplus transformed result is initialized near `0`. It allows a `Normal` distribution with `scale` parameter set to this value to approximately act like a point mass. |
| `loc_regularizer` | Regularizer function for the `loc` parameters. |
| `untransformed_scale_regularizer` | Regularizer function for the `scale` parameters. |
| `loc_constraint` | An optional projection function to be applied to the loc after being updated by an `Optimizer`. The function must take as input the unprojected variable and must return the projected variable (which must have the same shape). Constraints are not safe to use when doing asynchronous distributed training. |
| `untransformed_scale_constraint` | An optional projection function to be applied to the `scale` parameters after being updated by an `Optimizer` (e.g. used to implement norm constraints or value constraints). The function must take as input the unprojected variable and must return the projected variable (which must have the same shape). Constraints are not safe to use when doing asynchronous distributed training. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| `make_normal_fn` | Python `callable` which creates a `tfd.Normal` using from args: `dtype, shape, name, trainable, add_variable_fn`. |

<br />