ferrine / gelato Goto Github PK
View Code? Open in Web Editor NEWBayesian dessert for Lasagne
License: MIT License
Bayesian dessert for Lasagne
License: MIT License
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)
Are there plans to add keras support to gelato?
When I attempt to import gelato, it fails with the following error message:
---> 19 class LayerModelMeta(pm.model.InitContextMeta):
20 """Magic comes here
21 """
AttributeError: module 'pymc3.model' has no attribute 'InitContextMeta'
I believe that InitContextMeta
no longer exists in pymc3; it's been merged with ContextMeta
.
I don't know if there are plans to update this repository anytime soon, although it does seem like a useful tool, so it would be great if it worked with the latest pymc3.
Bayesian desert for Lasagne
Should be:
Bayesian dessert for Lasagne
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.