def buildSlicedNetwork():
 N = FeedForwardNetwork('sliced')
 a = LinearLayer(2, name='a')
 b = LinearLayer(2, name='b')
 N.addInputModule(a)
 N.addOutputModule(b)
 N.addConnection(FullConnection(a, b, inSliceTo=1, outSliceFrom=1))
 N.addConnection(FullConnection(a, b, inSliceFrom=1, outSliceTo=1))
 N.sortModules()
 return N

def buildSlicedNetwork ( ) : N = FeedForwardNetwork ( 'sliced' ) a = LinearLayer ( 2 , name = 'a' ) b = LinearLayer ( 2 , name = 'b' ) N . addInputModule ( a ) N . addOutputModule ( b ) N . addConnection ( FullConnection ( a , b , inSliceTo = 1 , outSliceFrom = 1 ) ) N . addConnection ( FullConnection ( a , b , inSliceFrom = 1 , outSliceTo = 1 ) ) N . sortModules ( ) return N
build a network with shared connections .