#NEWLINE# def bprop( self ) : #NEWLINE# #INDENT# tmp1 = ( 1 - self . target . array ) #NEWLINE# tmp2 = ( 1 - self . pred . array ) #NEWLINE# tmp2 += self . eps #NEWLINE# ca . divide ( tmp1 , tmp2 , tmp1 ) #NEWLINE# ca . add ( self . pred . array , self . eps , tmp2 ) #NEWLINE# ca . divide ( self . target . array , tmp2 , out = tmp2 ) #NEWLINE# ca . subtract ( tmp1 , tmp2 , self . pred . grad_array ) #NEWLINE# self . pred . grad_array *= ca . reshape ( self . grad_array , self . bcast_shape )