<s> import sys <EOL> import time <EOL> import numpy as np <EOL> import lstm_old as l <EOL> start = time . time ( ) <EOL> timespan = <NUM_LIT:100> <EOL> multiErr = len ( sys . argv ) > <NUM_LIT:1> and sys . argv [ <NUM_LIT:1> ] == '<STR_LIT:m>' <EOL> for i in range ( <NUM_LIT:0> , <NUM_LIT:10> ) : <EOL> lstm = l . LSTM_Old ( <EOL> inputDim = <NUM_LIT:100> , <EOL> outputDim = <NUM_LIT:100> , <EOL> initRange = <NUM_LIT> , <EOL> initSeed = <NUM_LIT:3> , <EOL> cutOffZeroEnd = True , <EOL> multiErr = multiErr , <EOL> outputdEdX = True ) <EOL> X = np . random . rand ( <NUM_LIT:10> , timespan , <NUM_LIT:100> ) <EOL> Y = lstm . forward ( X ) <EOL> dEdY = np . random . rand ( <NUM_LIT:10> , timespan , <NUM_LIT:100> ) if multiErr else np . random . rand ( <NUM_LIT:10> , <NUM_LIT:100> ) <EOL> dEdY = lstm . backward ( dEdY ) <EOL> print '<STR_LIT>' % ( time . time ( ) - start ) </s>
