def get_model(config, depth, anchors, experimental_loss, do_fine_tune,
    num_fine_tune_layers, num_gpus, pretrained_weights):
    """
    Create the model for training/prediction

    :param config: Configuration dictonary
    :param depth: Image depth
    :param anchors: Anchors
    :param experimental_loss: True if the experimental loss should be used
    :param do_fine_tune: True if fine tuning should be done
    :param num_fine_tune_layers: Number of layers to fine tune
    :param num_gpus: List of GPU IDs to use
    :param pretrained_weights: Pretrained weights for initialization
    :return: Configuriered model
    """
    backend_weights = None
    if 'backend_weights' in config['model']:
        backend_weights = config['model']['backend_weights']
    from cryolo.frontend import YOLO
    if num_gpus > 1:
        import tensorflow as tf
        with tf.device('/cpu:0'):
            yolo = YOLO(architecture=config['model']['architecture'],
                input_size=config['model']['input_size'], input_depth=depth,
                labels=config['model']['labels'], max_box_per_image=config[
                'model']['max_box_per_image'], anchors=anchors,
                backend_weights=backend_weights, experimental_loss=
                experimental_loss, pretrained_weights=pretrained_weights,
                fine_tune=do_fine_tune, num_fine_tune_layers=
                num_fine_tune_layers)
    else:
        yolo = YOLO(architecture=config['model']['architecture'],
            input_size=config['model']['input_size'], input_depth=depth,
            labels=config['model']['labels'], max_box_per_image=config[
            'model']['max_box_per_image'], anchors=anchors, backend_weights
            =backend_weights, experimental_loss=experimental_loss,
            pretrained_weights=pretrained_weights, fine_tune=do_fine_tune,
            num_fine_tune_layers=num_fine_tune_layers)
    yolo.model.summary()
    return yolo
