Exemple #1
0
def get_hyper_parameters(version, project_path, get_param_space = True):
    import hyperparameter.hyperparameter as hp
    hp_obj = hp.HyperParameters(version, project_path)
    param_dict = hp_obj.get_params()
    if get_param_space:
        param_dict_space = hp_obj.get_param_space()
        return param_dict, param_dict_space
    else:
        return param_dict
Exemple #2
0
def get_model(model_version, param_version, project_path):
    import hyperparameter.hyperparameter as hp
    hp_obj = hp.HyperParameters(param_version, project_path)
    param_dict = hp_obj.get_params()
    model_module_path = "architecture.version" + str(model_version) + ".model"
    model_module = importlib.import_module(model_module_path)
    inputs = tf.placeholder(tf.float32, shape=(1, 224, 224, 3))
    model = model_module.create_model(inputs, param_dict)
    return model
Exemple #3
0
def set_hyper_parameter(version, project_path, dict):
    import hyperparameter.hyperparameter as hp
    hp_obj = hp.HyperParameters(version, project_path)
    for key, value in dict.items():
        hp_obj.set_parameter(key, value)
    hp_obj.dump_parameter()
def get_hyper_parameters(version, project_path):
    import hyperparameter.hyperparameter as hp
    hp_obj = hp.HyperParameters(version, project_path)
    param_dict = hp_obj.get_params()
    return param_dict