#NEWLINE# def perform( self , node , inp , out_ ) : #NEWLINE# #INDENT# ( o , W , h , iIdx , oIdx ) = inp [ : 5 ] #NEWLINE# if ( not self . inplace ) : #NEWLINE# #INDENT# o = o . copy ( ) #NEWLINE# #UNINDENT# for b in range ( o . shape [ 0 ] ) : #NEWLINE# #INDENT# for j in range ( o . shape [ 1 ] ) : #NEWLINE# #INDENT# outputIdx = oIdx [ ( b , j ) ] #NEWLINE# for i in range ( h . shape [ 1 ] ) : #NEWLINE# #INDENT# inputIdx = iIdx [ ( b , i ) ] #NEWLINE# w = W [ ( node , outputIdx ) ] #NEWLINE# o [ b , j , : ] += numpy . dot ( h [ ( b , i ) ] , w ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# out_ [ 0 ] [ 0 ] = o