<s> """<STR_LIT>""" <EOL> __author__ = '<STR_LIT>' <EOL> from pybrain . structure . networks . recurrent import RecurrentNetwork <EOL> from pybrain import LinearLayer , FullConnection , MDLSTMLayer , BiasUnit , IdentityConnection <EOL> from pybrain . tests import runModuleTestSuite <EOL> def buildSimpleMDLSTMNetwork ( peepholes = False ) : <EOL> N = RecurrentNetwork ( '<STR_LIT>' ) <EOL> i = LinearLayer ( <NUM_LIT:1> , name = '<STR_LIT:i>' ) <EOL> dim = <NUM_LIT:1> <EOL> h = MDLSTMLayer ( dim , peepholes = peepholes , name = '<STR_LIT>' ) <EOL> o = LinearLayer ( <NUM_LIT:1> , name = '<STR_LIT:o>' ) <EOL> b = BiasUnit ( '<STR_LIT>' ) <EOL> N . addModule ( b ) <EOL> N . addOutputModule ( o ) <EOL> N . addInputModule ( i ) <EOL> N . addModule ( h ) <EOL> N . addConnection ( FullConnection ( i , h , outSliceTo = <NUM_LIT:4> * dim , name = '<STR_LIT>' ) ) <EOL> N . addConnection ( FullConnection ( b , h , outSliceTo = <NUM_LIT:4> * dim , name = '<STR_LIT>' ) ) <EOL> N . addRecurrentConnection ( FullConnection ( h , h , inSliceTo = dim , outSliceTo = <NUM_LIT:4> * dim , name = '<STR_LIT>' ) ) <EOL> N . addRecurrentConnection ( IdentityConnection ( h , h , inSliceFrom = dim , outSliceFrom = <NUM_LIT:4> * dim , name = '<STR_LIT>' ) ) <EOL> N . addConnection ( FullConnection ( h , o , inSliceTo = dim , name = '<STR_LIT>' ) ) <EOL> N . sortModules ( ) <EOL> return N <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> runModuleTestSuite ( __import__ ( '<STR_LIT:__main__>' ) ) </s>
