@staticmethod
def find_compiled_layer_by_name(model, layer_name):
    """ Returns the Keras tensor associated with a given name.

			# Arguments

			model: Model instance. The Kur model. It must be compiled.
			layer_name: str. The name of the layer to find, or one of its
				aliases.

			# Return value

			The Keras tensor
		"""
    if model.compiled is None or 'raw' not in model.compiled:
        raise ValueError('The model must be compiled first.')
    if layer_name in model.output_aliases:
        target = model.output_aliases[layer_name]
    elif layer_name in model.input_aliases:
        target = model.input_aliases[layer_name]
    else:
        raise ValueError('Failed to find a layer named "{}"'.format(layer_name)
            )
    for keras_layer, kur_layer in zip(model.compiled['raw'].outputs, model.
        outputs):
        if kur_layer == target:
            return keras_layer
    raise ValueError('Did not find expected layer. This is a bug.')
