'Looks for the name of the layer producing the logits.
:return: name of layer producing the logits'

def _get_logits_name(self):

    softmax_name = self._get_softmax_name()
    softmax_layer = self.model.get_layer(softmax_name)
    node = softmax_layer.inbound_nodes[0]
    logits_name = node.inbound_layers[0].name
    return logits_name
