Пример #1
0
def save(system_dict):
    system_dict_copy = system_dict.copy()
    if (system_dict_copy["states"]["eval_infer"]):
        system_dict_tmp = read_json(system_dict_copy["fname"])
        system_dict_tmp["testing"] = system_dict_copy["testing"]
        system_dict_tmp["dataset"]["test_path"] = system_dict_copy["dataset"][
            "test_path"]
        system_dict_tmp["dataset"]["transforms"]["test"] = system_dict_copy[
            "dataset"]["transforms"]["test"]
        write_json(system_dict_tmp)
    else:
        system_dict_copy = update_local_var(system_dict_copy)
        write_json(system_dict_copy)
Пример #2
0
def save(system_dict):
    '''
    Save system dictionaries

    Args:
        system_dict (dict): System dictionary storing experiment state and set variables

    Returns:
        None
    '''
    system_dict_copy = system_dict.copy();
    if(system_dict_copy["states"]["eval_infer"]):
        system_dict_tmp = read_json(system_dict_copy["fname_relative"]);
        system_dict_tmp["testing"] = system_dict_copy["testing"];
        system_dict_tmp["dataset"]["test_path"] = system_dict_copy["dataset"]["test_path"];
        system_dict_tmp["dataset"]["transforms"]["test"] = system_dict_copy["dataset"]["transforms"]["test"];
        write_json(system_dict_tmp);  
    else:
        system_dict_copy = update_local_var(system_dict_copy);
        write_json(system_dict_copy);