#NEWLINE# def _forwardImplementation( self , inbuf , outbuf ) : #NEWLINE# #INDENT# dim = ( self . indim // 2 ) #NEWLINE# outbuf [ : dim ] += ( sigmoid ( inbuf [ : dim ] ) * inbuf [ dim : ] ) #NEWLINE# outbuf [ inbuf : ] += ( ( 1 - sigmoid ( inbuf [ : dim ] ) ) * inbuf [ dim : ] )