#NEWLINE# def G( self , X , model ) : #NEWLINE# #INDENT# '\n        Computes `G` from the NCE paper.\n\n        Parameters\n        ----------\n        X : Theano matrix\n            Batch of input data\n        model : Model\n            Any model with a `log_prob` method.\n\n        Returns\n        -------\n        G : A theano symbol for the `G` function from the paper.\n        ' #NEWLINE# return ( model . log_prob ( X ) - self . noise . log_prob ( self ) )