net = FeedForwardNetwork()
inp = LinearLayer(9)
h1 = SigmoidLayer(2)
h2 = TanhLayer(2)
outp = LinearLayer(1)
net.addOutputModule(outp)
net.addInputModule(inp)
net.addModule(h1)
net.addModule(h2)
net.addConnection(FullConnection(inp, h1, inSliceTo=6))
net.addConnection(FullConnection(inp, h2, inSliceFrom=6))
net.addConnection(FullConnection(h1, h2))
net.addConnection(FullConnection(h2, outp))
net.sortModules()
Creating custom connectivity in PyBrain neural networks