def call(self, features, object_selector, training):
    with tf.name_scope('encoder'):
        pixel_encoding = self._encode_pixel(features, object_selector, training)
        (vh_encoding, obj_embedding) = self._encode_view_hierarchy(features, object_selector, training)
        logging.info('Screen encoder: %s', self._hparams['screen_encoder'])
        if (self._hparams['screen_encoder'] == 'pixel_only'):
            combined_output = pixel_encoding
        elif (self._hparams['screen_encoder'] == 'pixel_transformer'):
            combined_output = tf.concat([pixel_encoding, vh_encoding], (- 1))
        elif (self._hparams['screen_encoder'] == 'pixel_mlp'):
            combined_output = tf.concat([pixel_encoding, obj_embedding], (- 1))
        else:
            raise ValueError
        logits = self._final_layer(combined_output)
        logits = tf.nn.relu(logits)
        if training:
            logits = tf.nn.dropout(logits, rate=self._hparams['dropout'])
        logits = tf.expand_dims(logits, 1)
    return logits
def call(self, features, object_selector, training):
    with tf.name_scope('encoder'):
        pixel_encoding = self._encode_pixel(features, object_selector, training)
        (vh_encoding, obj_embedding) = self._encode_view_hierarchy(features, object_selector, training)
        logging.info('Screen encoder: %s', self._hparams['screen_encoder'])
        if (self._hparams['screen_encoder'] == 'pixel_only'):
            combined_output = pixel_encoding
        elif (self._hparams['screen_encoder'] == 'pixel_transformer'):
            combined_output = tf.concat([pixel_encoding, vh_encoding], (- 1))
        elif (self._hparams['screen_encoder'] == 'pixel_mlp'):
            combined_output = tf.concat([pixel_encoding, obj_embedding], (- 1))
        else:
            raise ValueError
        logits = self._final_layer(combined_output)
        logits = tf.nn.relu(logits)
        if training:
            logits = tf.nn.dropout(logits, rate=self._hparams['dropout'])
        logits = tf.expand_dims(logits, 1)
    return logits