Skip to content

Error using MCMC #204

@doctorwes

Description

@doctorwes

I am using the same model as in #195 (closed; thank you!), but attempting to use MCMC rather than VI.

(Note that I can successfully run the sample notebook MCMC-logregression.ipynb)

MC = inf.inference.MCMC(num_results=1000)
m.fit({"x": data}, MC)

I get the following error:

---------------------------------------------------------------------------
FailedPreconditionError                   Traceback (most recent call last)
/home/wkp/.conda/envs/WKPenv/lib/python3.6/site-packages/tensorflow/python/client/session.py in _do_call(self, fn, *args)
   1355     try:
-> 1356       return fn(*args)
   1357     except errors.OpError as e:

/home/wkp/.conda/envs/WKPenv/lib/python3.6/site-packages/tensorflow/python/client/session.py in _run_fn(feed_dict, fetch_list, target_list, options, run_metadata)
   1340       return self._call_tf_sessionrun(
-> 1341           options, feed_dict, fetch_list, target_list, run_metadata)
   1342 

/home/wkp/.conda/envs/WKPenv/lib/python3.6/site-packages/tensorflow/python/client/session.py in _call_tf_sessionrun(self, options, feed_dict, fetch_list, target_list, run_metadata)
   1428         self._session, options, feed_dict, fetch_list, target_list,
-> 1429         run_metadata)
   1430 

FailedPreconditionError: Error while reading resource variable mcmc_sample_chain_1/mh_bootstrap_results/hmc_kernel_bootstrap_results/maybe_call_fn_and_grads/value_and_gradients/value_and_gradient/dense_40/bias from Container: localhost. This could mean that the variable was uninitialized. Not found: Resource localhost/mcmc_sample_chain_1/mh_bootstrap_results/hmc_kernel_bootstrap_results/maybe_call_fn_and_grads/value_and_gradients/value_and_gradient/dense_40/bias/N10tensorflow3VarE does not exist.
	 [[{{node mcmc_sample_chain_1/mh_bootstrap_results/hmc_kernel_bootstrap_results/maybe_call_fn_and_grads/value_and_gradients/value_and_gradient/dense_40/BiasAdd/ReadVariableOp}}]]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions