def check_args(parsed_args):
    """
    Function to check for inherent contradictions within parsed arguments.
    For example, batch_size < num_gpus
    Intended to raise errors prior to backend initialisation.

    Args
        parsed_args: parser.parse_args()

    Returns
        parsed_args
    """
    if (parsed_args.num_gpus > 1 and parsed_args.batch_size < parsed_args.
        num_gpus):
        raise ValueError(
            'Batch size ({}) must be equal to or higher than the number of GPUs ({})'
            .format(parsed_args.batch_size, parsed_args.multi_gpu))
    if parsed_args.num_gpus > 1 and parsed_args.snapshot:
        raise ValueError(
            'Multi GPU training ({}) and resuming from snapshots ({}) is not supported.'
            .format(parsed_args.multi_gpu, parsed_args.snapshot))
    if parsed_args.num_gpus > 1 and not parsed_args.multi_gpu_force:
        raise ValueError(
            'Multi-GPU support is experimental, use at own risk! Run with --multi-gpu-force if you wish to continue.'
            )
    return parsed_args
