#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# self . link = links . PReLU ( ) #NEWLINE# W = self . link . W . data #NEWLINE# W [ ... ] = numpy . random . uniform ( ( - 1 ) , 1 , W . shape ) #NEWLINE# self . link . zerograds ( ) #NEWLINE# self . W = W . copy ( ) #NEWLINE# self . x = numpy . random . uniform ( ( - 1 ) , 1 , ( 4 , 3 , 2 ) ) . astype ( numpy . float32 ) #NEWLINE# for i in range ( self . x . size ) : #NEWLINE# #INDENT# if ( ( - 0.01 ) < self . x . flat [ self ] < 0.01 ) : #NEWLINE# #INDENT# self . x . flat [ i ] = 0.5 #NEWLINE# #UNINDENT# #UNINDENT# self . gy = numpy . random . uniform ( ( - 1 ) , 1 , ( 4 , 3 , 2 ) ) . astype ( numpy . float32 )