I want to create an artificial neural network (in PyBrain) that follows the following layout:
However, I cannot find the proper way to achieve this. The only option that I see in the documentation is the way to create fully connected layers, which is not what I want: I want some of my input nodes to be connected to the second hidden layer and not to the first one.
The solution is to use the connection type of your choice, but with slicing parameters:
inSliceFrom
,inSliceTo
,outSliceFrom
andoutSliceTo
. I agree the documentation should mention this, so far it's only in theConnection
class' comments.Here is example code for your case:
An alternative way to the one suggested by schaul is to use multiple input layers.