twiecki on pre-commit-config-update-0
⬆️ UPGRADE: Autoupdate pre-comm… (compare)
fonnesbeck on main
Make VI (posterior) mean and st… (compare)
Yeah i saw the term Traceback and i got what u mean. Here is the error ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-51-67616625ebc1> in <module>()
1 ann_input.set_value(X_test)
2 ann_output.set_value(Y_test)
----> 3 ppc = pm.sample_ppc(trace, model=basic_model, samples=500, progressbar=False)
4
5 # Use probability of > 0.5 to assume prediction of class 1
C:\Users\Nikos\Documents\Lasagne\python-3.4.4.amd64\lib\site-packages\pymc3\sampling.py in sample_ppc(trace, samples, model, vars, size, random_seed, progressbar)
526 for var in vars:
527 ppc[var.name].append(var.distribution.random(point=param,
--> 528 size=size))
529
530 return {k: np.asarray(v) for k, v in ppc.items()}
C:\Users\Nikos\Documents\Lasagne\python-3.4.4.amd64\lib\site-packages\pymc3\distributions\continuous.py in random(self, point, size, repeat)
219 def random(self, point=None, size=None, repeat=None):
220 mu, tau, _ = draw_values([self.mu, self.tau, self.sd],
--> 221 point=point)
222 return generate_samples(stats.norm.rvs, loc=mu, scale=tau**-0.5,
223 dist_shape=self.shape,
C:\Users\Nikos\Documents\Lasagne\python-3.4.4.amd64\lib\site-packages\pymc3\distributions\distribution.py in draw_values(params, point)
183 if not isinstance(node, (tt.sharedvar.TensorSharedVariable,
184 tt.TensorConstant)):
--> 185 givens[name] = (node, drawvalue(node, point=point))
186 values = [None for in params]
187 for i, param in enumerate(params):
C:\Users\Nikos\Documents\Lasagne\python-3.4.4.amd64\lib\site-packages\pymc3\distributions\distribution.py in draw_value(param, point, givens)
251 except:
252 shape = param.shape
--> 253 if len(shape) == 0 and len(value) == 1:
254 value = value[0]
255 return value
TypeError: object of type 'TensorVariable' has no len()
obj_optimizer=pm.adagrad_window(learning_rate)
, or are there other parameters I need to set appropriately?
FloatingPointError: NaN occurred in optimization.
error on the first ADVI iteration. All the parameters I set for the model (priors, etc.) have not changed, I've only changed the API to access ADVI to pm.fit
. Am I missing something obvious with the upgrade?