bayerj / arac

C++ library for neural networks.
Other
39 stars 57 forks source link

_FeedForwardNetwork.offset attribute #25

Open jjblum opened 8 years ago

jjblum commented 8 years ago

The following error occurs when I try to build an ARAC network, using PyBrain v 0.3.3.

Traceback (most recent call last): File "pybrain_first_tests.py", line 24, in agent = knee_agent.Knee_Agent() File "knee_agent.py", line 30, in init self._QNN = knee_NN.Knee_ActionValueNetwork(knee_environment.TOTAL_STATE_DIMENSION, knee_environment.ACTION_DIMENSION) File "knee_NN.py", line 17, in init self.network = buildNetwork(state_dimension + discreet_action_count, state_dimension + discreet_action_count, 1, fast=True) # use ARAC File "/usr/local/lib/python2.7/dist-packages/PyBrain-0.3.3-py2.7.egg/pybrain/tools/shortcuts.py", line 108, in buildNetwork n.sortModules() File "/usr/local/lib/python2.7/dist-packages/arac/pybrainbridge.py", line 274, in sortModules super(_Network, self).sortModules() File "/usr/local/lib/python2.7/dist-packages/PyBrain-0.3.3-py2.7.egg/pybrain/structure/networks/network.py", line 258, in sortModules Module.init(self, self.indim, self.outdim, name=self.name) File "/usr/local/lib/python2.7/dist-packages/PyBrain-0.3.3-py2.7.egg/pybrain/structure/modules/module.py", line 51, in init self._resetBuffers() File "/usr/local/lib/python2.7/dist-packages/PyBrain-0.3.3-py2.7.egg/pybrain/structure/networks/network.py", line 262, in _resetBuffers super(Network, self)._resetBuffers(length) File "/usr/local/lib/python2.7/dist-packages/PyBrain-0.3.3-py2.7.egg/pybrain/structure/modules/module.py", line 58, in _resetBuffers self.offset = 0 AttributeError: can't set attribute

The "offset" attribute of the _FeedForwardNetwork produces a key error.

jjblum commented 8 years ago

Using _buildNetwork instead does not throw an error.