def validate_model_data(args):
    """
    Ensures that the specified model and dataset are compatible
    """
    implemented_models = ["cpreresnet20", "resnet18", "vgg19"]
    implemented_datasets = ["cifar10", "imagenet"]

    if args.model not in implemented_models:
        raise ValueError(f"{args.model} not implemented.")

    if args.dataset not in implemented_datasets:
        raise ValueError(f"{args.dataset} not implemented.")

    if args.dataset == "imagenet":
        if args.model not in ("resnet18", "vgg19"):
            raise ValueError(
                f"{args.model} does not support ImageNet. Supported models: resnet18, vgg19"
            )
    elif args.dataset == "cifar10":
        if args.model not in ("cpreresnet20"):
            raise ValueError(
                f"{args.model} does not support CIFAR. Supported models: cpreresnet20"
            )

    return args