(self, features, **kwargs)
return logits
Implementation of __call__().
Implementation of __call__().
Implementation of __call__ () .
def call(self, features, **kwargs):
    ''' Implementation of __call__(). '''
    self.train = kwargs['training']
    feats = tf.identity(features['inputs'], name='feats')
    logging.info(features)
    if 'labels' in features:
      labels = features['labels']
    else:
      # serving export mode
      labels = None

    with tf.variable_scope('model', reuse=tf.AUTO_REUSE):
      feats = self.preprocess(feats)
      logits = self.model(feats, labels)
    return logits
def call ( self , features , * * kwargs ) : self . train = kwargs [ 'training' ] feats = tf . identity ( features [ 'inputs' ] , name = 'feats' ) logging . info ( features ) if 'labels' in features : labels = features [ 'labels' ] else : # serving export mode labels = None with tf . variable_scope ( 'model' , reuse = tf . AUTO_REUSE ) : feats = self . preprocess ( feats ) logits = self . model ( feats , labels ) return logits