IDSIA / brainstorm

Fast, flexible and fun neural networks.
Other
1.3k stars 154 forks source link

create_net_from_spec: Parsing error #110

Open michaelwand opened 8 years ago

michaelwand commented 8 years ago

create_net_from_spec causes a parsing error depending on the presence or absence of whitespace, which is not according to the documentation ("Whitespace is allowed everywhere and will be completely ignored.").

Example script to reproduce the error:

import brainstorm as bs
print('This works')
net = bs.tools.create_net_from_spec('classification',4,5,'Ft200 D Ft200 D Ft200')
print('This does not work')
net = bs.tools.create_net_from_spec('classification',4,5,'Ft200DFt200DFt200')
print('Never reached')

Output:

This works This does not work Traceback (most recent call last): File "DoSomething.py", line 15, in net = bs.tools.create_net_from_spec('classification',4,5,'Ft200DFt200DFt200') File "build/bdist.linux-x86_64/egg/brainstorm/tools.py", line 614, in create_net_from_spec File "build/bdist.linux-x86_64/egg/brainstorm/tools.py", line 498, in create_layer KeyError: 'DF'