#NEWLINE# def buildMixedNestedNetwork( ) : #NEWLINE# #INDENT# ' build a nested network with the inner one being a ffn and the outer one being recurrent. ' #NEWLINE# N = RecurrentNetwork ( 'outer' ) #NEWLINE# a = LinearLayer ( 1 , name = 'a' ) #NEWLINE# b = LinearLayer ( 2 , name = 'b' ) #NEWLINE# c = buildNetwork ( 2 , 3 , 1 ) #NEWLINE# c . name = 'inner' #NEWLINE# N . addInputModule ( a ) #NEWLINE# N . addModule ( c ) #NEWLINE# N . addOutputModule ( b ) #NEWLINE# N . addConnection ( FullConnection ( a , b ) ) #NEWLINE# N . addConnection ( FullConnection ( b , c ) ) #NEWLINE# N . addRecurrentConnection ( FullConnection ( c , c ) ) #NEWLINE# N . sortModules ( ) #NEWLINE# return N