def set_model_weights(model, weights):
    """Set the given weights to keras model

    Args:
        model : Keras model instance
        weights (dict): Dictionary of weights

    Return:
        Keras model instance with weights set

    """
    for key in weights.keys():
        model.get_layer(key).set_weights(weights[key])

    return model