def get_loss(config: LossConfig) -> 'Loss':
    """
    Returns a Loss instance.

    :param config: Loss configuration.
    :return: Instance implementing the Loss.
    """
    if config.name == C.CROSS_ENTROPY:
        return CrossEntropyLoss(config,
                                output_names=[C.SOFTMAX_OUTPUT_NAME],
                                label_names=[C.TARGET_LABEL_NAME])
    else:
        raise ValueError("unknown loss name: %s" % config.name)
Returns a Loss instance.

    :param config: Loss configuration.
    :return: Instance implementing the Loss.