#NEWLINE# def __call__( self , x , context ) : #NEWLINE# #INDENT# loss = None #NEWLINE# for c in context : #NEWLINE# #INDENT# e = self . embed ( c ) #NEWLINE# loss_i = self . loss_func ( e , x ) #NEWLINE# loss = ( loss_i if ( loss is None ) else ( loss + loss_i ) ) #NEWLINE# #UNINDENT# return loss