def dictionary_update(dict1, dict2):
    """
    Updates dictionary values if required
    
    : dict1 (dict): reference dictionary
    : dict2 (dict): dictionary with potential updates
    
    """
    
    # Generate a set of common keys
    common_keys = dict1.keys() & dict2.keys()
    
    # Updating hyperparameters
    if len(common_keys) != 0:
        for k in common_keys:
            dict1[k] = dict2[k]

    return dict1