i get the above error for the below part.
with neural_network:
inference = pm.ADVI()
mean_field = pm.fit(method='advi', n=1,
callbacks=[pm.callbacks.CheckParametersConvergence(diff='relative')])
approx = inference.approx
test_probs = approx.sample_node(act_out, more_replacements={Xt: grid_2d})
eval_tracker = pm.callbacks.Tracker(
test_probs=test_probs.eval,
)
inference.fit(method='advi', n=5,
callbacks=[pm.callbacks.CheckParametersConvergence(diff='relative'),
eval_tracker])
##############################
i am not sure what define Xt as. and when i define it as Xt = theano.shared(X_test) it gives me an error
TypeError Traceback (most recent call last)
in ()
12 inference.fit(method='advi', n=5,
13 callbacks=[pm.callbacks.CheckParametersConvergence(diff='relative'),
---> 14 eval_tracker])
C:\ProgramData\Anaconda3\lib\site-packages\pymc3\variational\inference.py in fit(self, n, score, callbacks, progressbar, **kwargs)
121 callbacks = []
122 score = self._maybe_score(score)
--> 123 step_func = self.objective.step_function(score=score, **kwargs)
124 progress = tqdm.trange(n, disable=not progressbar)
125 if score:
C:\ProgramData\Anaconda3\lib\site-packages\pymc3\memoize.py in memoizer(*args, **kwargs)
14
15 if key not in cache:
---> 16 cache[key] = obj(*args, **kwargs)
17
18 return cache[key]
C:\ProgramData\Anaconda3\lib\site-packages\theano\configparser.py in res(*args, **kwargs)
115 def res(*args, **kwargs):
116 with self:
--> 117 return f(*args, **kwargs)
118 return res
119
TypeError: step_function() got an unexpected keyword argument 'method'
#####################################
this is for the following notebook
https://github.com/twiecki/WhileMyMCMCGentlySamples/blob/master/content/downloads/notebooks/bayesian_neural_network.ipynb