I'm up-to-date on pymc3 and gelato.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/Users/twiecki/anaconda/lib/python3.6/site-packages/theano/gof/op.py in __call__(self, *inputs, **kwargs)
624 try:
--> 625 storage_map[ins] = [self._get_test_value(ins)]
626 compute_map[ins] = [True]
/Users/twiecki/anaconda/lib/python3.6/site-packages/theano/gof/op.py in _get_test_value(cls, v)
580 detailed_err_msg = utils.get_variable_trace_string(v)
--> 581 raise AttributeError('%s has no test value %s' % (v, detailed_err_msg))
582
AttributeError: Softmax.0 has no test value
Backtrace when that variable is created:
File "/Users/twiecki/anaconda/lib/python3.6/site-packages/ipykernel/zmqshell.py", line 533, in run_cell
return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs)
File "/Users/twiecki/anaconda/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2717, in run_cell
interactivity=interactivity, compiler=compiler, result=result)
File "/Users/twiecki/anaconda/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2821, in run_ast_nodes
if self.run_code(code, result):
File "/Users/twiecki/anaconda/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2881, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-18-7dd01309b711>", line 37, in <module>
prediction = gelato.layers.get_output(network)
File "/Users/twiecki/anaconda/lib/python3.6/site-packages/lasagne/layers/helper.py", line 190, in get_output
all_outputs[layer] = layer.get_output_for(layer_inputs, **kwargs)
File "/Users/twiecki/anaconda/lib/python3.6/site-packages/lasagne/layers/dense.py", line 124, in get_output_for
return self.nonlinearity(activation)
File "/Users/twiecki/anaconda/lib/python3.6/site-packages/lasagne/nonlinearities.py", line 44, in softmax
return theano.tensor.nnet.softmax(x)
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
<ipython-input-18-7dd01309b711> in <module>()
44 prediction,
45 observed=target_var,
---> 46 total_size=total_size)
/Users/twiecki/working/projects/pymc/pymc3/distributions/distribution.py in __new__(cls, name, *args, **kwargs)
35 raise TypeError("observed needs to be data but got: {}".format(type(data)))
36 total_size = kwargs.pop('total_size', None)
---> 37 dist = cls.dist(*args, **kwargs)
38 return model.Var(name, dist, data, total_size)
39 else:
/Users/twiecki/working/projects/pymc/pymc3/distributions/distribution.py in dist(cls, *args, **kwargs)
46 def dist(cls, *args, **kwargs):
47 dist = object.__new__(cls)
---> 48 dist.__init__(*args, **kwargs)
49 return dist
50
/Users/twiecki/working/projects/pymc/pymc3/distributions/discrete.py in __init__(self, p, *args, **kwargs)
429 super(Categorical, self).__init__(*args, **kwargs)
430 try:
--> 431 self.k = tt.shape(p)[-1].tag.test_value
432 except AttributeError:
433 self.k = tt.shape(p)[-1]
/Users/twiecki/anaconda/lib/python3.6/site-packages/theano/gof/op.py in __call__(self, *inputs, **kwargs)
637 raise ValueError(
638 'Cannot compute test value: input %i (%s) of Op %s missing default value. %s' %
--> 639 (i, ins, node, detailed_err_msg))
640 elif config.compute_test_value == 'ignore':
641 # silently skip test
ValueError: Cannot compute test value: input 0 (Softmax.0) of Op Shape(Softmax.0) missing default value.
Backtrace when that variable is created:
File "/Users/twiecki/anaconda/lib/python3.6/site-packages/ipykernel/zmqshell.py", line 533, in run_cell
return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs)
File "/Users/twiecki/anaconda/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2717, in run_cell
interactivity=interactivity, compiler=compiler, result=result)
File "/Users/twiecki/anaconda/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2821, in run_ast_nodes
if self.run_code(code, result):
File "/Users/twiecki/anaconda/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2881, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-18-7dd01309b711>", line 37, in <module>
prediction = gelato.layers.get_output(network)
File "/Users/twiecki/anaconda/lib/python3.6/site-packages/lasagne/layers/helper.py", line 190, in get_output
all_outputs[layer] = layer.get_output_for(layer_inputs, **kwargs)
File "/Users/twiecki/anaconda/lib/python3.6/site-packages/lasagne/layers/dense.py", line 124, in get_output_for
return self.nonlinearity(activation)
File "/Users/twiecki/anaconda/lib/python3.6/site-packages/lasagne/nonlinearities.py", line 44, in softmax
return theano.tensor.nnet.softmax(x)