@fritzo is `pyro.deterministic`

working in `pyro-ppl==1.3.0`

? It seams to have no effect and I really wanted to use it.

Input:

```
def model(x, y=None):
multiplier = 2
mean = pyro.sample("mean", dist.Normal(5., 10.))
sigma = pyro.deterministic("sigma", torch.abs(x*multiplier) + 1)
with pyro.plate("data", x.shape[0]):
return pyro.sample("obs", dist.Normal(mean, sigma), obs=y)
x = torch.distributions.Bernoulli(0.6).sample((100,))
y = model(x)
def guide(x, y=None):
mean_mean = pyro.param("mean_mean", torch.Tensor([1]))
mean = pyro.sample("mean", dist.Normal(mean_mean, 1.))
multiplier = pyro.param('multiplier', torch.Tensor([7]))
sigma = torch.abs(x*multiplier) + 1
with pyro.plate("data", x.shape[0]):
return pyro.sample("obs", dist.Normal(mean, sigma))
pyro.clear_param_store()
svi = SVI(model, guide, pyro.optim.Adam({"lr": 1e-3}), loss=Trace_ELBO())
for _ in range(1000):
svi.step(x, y)
dict(pyro.get_param_store())
```

Output:

```
{'mean_mean': tensor([1.9848], requires_grad=True),
'multiplier': tensor([7.9753], requires_grad=True)}
```

Edit: Ok, seems to work You have to call `pyro.sample`

on the final observable variable in the guide with is normaly not needed (or even no recomended).

Update: It turns out that `deterministic`

does not work when passed as mean for `Normal`

(did not check on other distributions). For that purpose I replaced it with `pyro.sample`

from `Delta`

(needed in the model and in the guide). @fritzo can you comment on this?