# Understanding ADVI initialisation

**URL:** <https://discourse.pymc.io/t/understanding-advi-initialisation/15150>\
**Category:** General\
**Created:** [September 27, 2024, 7:03am UTC](https://discourse.pymc.io/t/understanding-advi-initialisation/15150 "2024-09-27T07:03:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benjamin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/benjamin/32/8554_2.png) [@Benjamin](https://discourse.pymc.io/u/Benjamin)\
**Post date:** [September 27, 2024, 7:03am UTC](https://discourse.pymc.io/t/understanding-advi-initialisation/15150/1 "2024-09-27T07:03:47Z")

</div>

I would like to better understand how to manually initialise a `pymc.fit` when using `method='advi'`.

Specifically I am using

```python
advi = pymc.ADVI()
tracker = pymc.variational.callbacks.Tracker(
    mean = advi.approx.mean.eval,
   std = advi.approx.std.eval,
)

```

in order to ‘track’ the parameters (are those ‘model parameters’ or the ADVI parameters \mu and \rho?) of the fit.

How can I use `tracker["mean"]` and `tracker["std"]` as `start` and `start_std` of `pymc.fit`? Does that even make sense?

In [How to initialize ADVI](https://discourse.pymc.io/t/how-to-initialize-advi/12693) it is suggested to use the posterior mean of the _model parameters_ to initialize the fit. I would have expected that I need to supply starting parameters for \mu and \rho instead?

Arguments `start` and `start_std` require a dictionary but `tracker["mean"][-1]` is an array, i.e. I am missing the correct keys, unless I really need to specify the _model parameters_. In that case should I use the posterior standard deviation to initialise `start_std`?

So essentially I am confused as to which parameters I need to supply for the initialisation? The one of the model or the one of the ADVI (mean field) approximation? And if I need to specify the parameters for the approximation, `\mu` and `\rho`, which are the correct keys for the `start` and `start_std` dictionaries?

```auto

```
