def call(self, inputs, training):
    (features, targets) = inputs
    object_selector = self._caption_object_selector(features)
    encoder_outputs = self._encoder(features, object_selector, training)
    if self._hparams['decoding_task']:
        if (targets is None):
            return self.predict(encoder_outputs, training)
        else:
            return self.decode(targets, encoder_outputs, training)
def call(self, inputs, training):
    (features, targets) = inputs
    object_selector = self._caption_object_selector(features)
    encoder_outputs = self._encoder(features, object_selector, training)
    if self._hparams['decoding_task']:
        if (targets is None):
            return self.predict(encoder_outputs, training)
        else:
            return self.decode(targets, encoder_outputs, training)