#NEWLINE# def __init__( self , name , outputDim = 0 , inputDim = 0 , initRange = 1.0 , initSeed = 2 , needInit = True , initWeights = 0 , learningRate = 0.0 , learningRateAnnealConst = 0.0 , momentum = 0.0 , deltaMomentum = 0.0 , weightClip = 0.0 , gradientClip = 0.0 , weightRegConst = 0.0 ) : #NEWLINE# #INDENT# Stage . __init__ ( self , name = name , outputDim = outputDim , inputNames = [ 'input' ] , learningRate = learningRate , learningRateAnnealConst = learningRateAnnealConst , momentum = deltaMomentum , deltaMomentum = deltaMomentum , weightClip = weightClip , gradientClip = gradientClip , weightRegConst = weightRegConst , outputdEdX = False ) #NEWLINE# if needInit : #NEWLINE# #INDENT# self . random = np . random . RandomState ( initSeed ) #NEWLINE# self . W = self . random . uniform ( ( ( - initRange ) / 2.0 ) , ( initRange / 2.0 ) , ( outputDim , inputDim ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . W = initWeights #NEWLINE# #UNINDENT# self . dEdW = 0