我在尝试运行有关 tensorflow 概率的贝叶斯逻辑回归示例时遇到问题,如图所示An Introduction to probabilistic Programming,现在可在 TensorFlow Probability中找到。
如果我只是在网站上运行代码,我会收到以下错误:
Traceback (most recent call last):
File "<input>", line 75, in <module>
TypeError: make_simple_step_size_update_policy() missing 1 required positional argument: 'num_adaptation_steps'
然后,当我指定 num_adaptation_steps=5 时,出现以下错误:
FailedPreconditionError (see above for traceback): Error while reading resource variable step_size_hmc from Container: localhost. This could mean that the variable was uninitialized. Not found: Container localhost does not exist. (Could not find resource: localhost/step_size_hmc)
[[node mcmc_sample_chain/transformed_kernel_bootstrap_results/Identity_2/ReadVariableOp (defined at /home/abeer/PycharmProjects/TensorFlowProbability/venv/lib/python3.6/site-packages/tensorflow_probability/python/mcmc/hmc.py:127) ]]
我不知道我做错了什么,任何帮助将不胜感激。谢谢!!