Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't slice learning rule input? #1365

Closed
jgosmann opened this issue Oct 1, 2017 · 4 comments · Fixed by #1385
Closed

Can't slice learning rule input? #1365

jgosmann opened this issue Oct 1, 2017 · 4 comments · Fixed by #1385
Labels

Comments

@jgosmann
Copy link
Collaborator

jgosmann commented Oct 1, 2017

#1310 added the possibility of arbitrarily sized inputs to learning rules, however it doesn't seem possible to slice into the input. I'm getting the following error:

  File "/home/jgosmann/Documents/projects/imem/imem/tcm.py", line 245, in __init__
    self.target.output[start:end], conn.learning_rule[1:])
TypeError: 'LearningRule' object is not subscriptable

That means I'm still stuck at not being able to implement multiple error signals (see #1307).

Or I'm doing something wrong and I'm completely blind to it ... (which is very well possible to).

@jgosmann jgosmann added the bug label Oct 1, 2017
@jgosmann
Copy link
Collaborator Author

jgosmann commented Oct 1, 2017

As a workaround it is possible to combine the error signals in a node and then connect that node to the learning rule.

@jgosmann
Copy link
Collaborator Author

jgosmann commented Oct 2, 2017

Though, I am not sure that the workaround actually works. I'm getting weird results, but cannot debug it right now.

@jgosmann
Copy link
Collaborator Author

jgosmann commented Oct 2, 2017

Just realized that I need this functionality more badly than I thought, so I guess I'm going to debug it after all.

@jgosmann
Copy link
Collaborator Author

jgosmann commented Oct 2, 2017

Found the problem why the workaround wasn't working: The error signal needs to be sliced in the learning rule's step function. If it is sliced in the make_step function creating the step function, it will not work.

@jgosmann jgosmann self-assigned this Nov 4, 2017
jgosmann added a commit that referenced this issue Nov 17, 2017
jgosmann added a commit that referenced this issue Nov 17, 2017
@jgosmann jgosmann removed their assignment Nov 17, 2017
tbekolay pushed a commit that referenced this issue Apr 16, 2018
This makes it easier to provide multiple error signal inputs.

Fixes #1365.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

1 participant