fixed mislabeling in print statements
also wording
"\n",
"Guide functions can serve as programmable, data-dependent proposal distributions for importance sampling, rejection sampling, sequential Monte Carlo, MCMC, and independent Metropolis-Hastings, and as variational distributions or inference networks for stochastic variational inference. Currently, importance sampling, MCMC, and stochastic variational inference are implemented in Pyro, and we plan to add other algorithms in the future.\n",
"\n",
- "Although the precise meaning of the guide is different across different inference algorithms, the guide function should generally be chosen so that, in principle, it is flexible enough to closely approximates the distribution over all unobserved `sample` statements in the model. "
+ "Although the precise meaning of the guide is different across different inference algorithms, the guide function should generally be chosen so that, in principle, it is flexible enough to closely approximate the distribution over all unobserved `sample` statements in the model. "
]
},
{
"plt.title(\"ELBO\")\n",
"plt.xlabel(\"step\")\n",
"plt.ylabel(\"loss\");\n",
- "print('a = ',pyro.param(\"b\").item())\n",
- "print('b = ', pyro.param(\"a\").item())"
+ "print('a = ',pyro.param(\"a\").item())\n",
+ "print('b = ', pyro.param(\"b\").item())"
]
},
{
"source": [
"**Note that SVI obtains parameters very close to the true parameters of the desired conditional distribution. This is to be expected as our guide is from the same family.**\n",
"\n",
- "Note that optimization will update the values of the guide parameters in the parameter store, so that once we find good parameter values, we can use samples from the guide as posterior samples from downstream tasks.\n",
+ "Note that optimization will update the values of the guide parameters in the parameter store, so that once we find good parameter values, we can use samples from the guide as posterior samples for downstream tasks.\n",
"\n"
]
},
