join(RESULTS_DIR, "dSprites", "FactorVAE", "auxiliary",
         "interpretability_metrics_v2"))

for run_id in run_ids:
    output_dir = abspath(
        join(RESULTS_DIR, "dSprites", "FactorVAE", enc_dec_model, run_id))

    config = {
        "output_dir": output_dir,
        "save_dir": save_dir,
        "num_bins": 200,

        # "num_bins": 20,
        # "num_bins": 50,
        # "num_bins": 80,
        # "num_bins": 150,
        # "num_bins": 200,
        # "num_bins": 300,
        # "num_bins": 500,
        "bin_limits": "-4;4",
        "data_proportion": 1.0,
    }

    arg_str = get_arg_string(config)
    set_GPUs([1])

    print("Running arguments: [{}]".format(arg_str))
    run_command = "{} ./7a_interpretability_metrics_v2.py {}".format(
        PYTHON_EXE, arg_str).strip()
    subprocess.call(run_command, shell=True)
Exemplo n.º 2
0
    # "run": "200_Pi_L4000_Nesterov",
    # "num_labeled": 4000,
    # ------------------------ #

    # 500
    # ------------------------ #
    # "run": "300_Pi_L500_Nesterov",
    # "num_labeled": 500,
    # ------------------------ #
    "force_rm_dir": True,
}
# =============================== #

if run_config['num_labeled'] == 500:
    config = DEFAULT_CONFIG_500
elif run_config['num_labeled'] == 1000:
    config = DEFAULT_CONFIG_1000
elif run_config['num_labeled'] == 2000:
    config = DEFAULT_CONFIG_2000
elif run_config['num_labeled'] == 4000:
    config = DEFAULT_CONFIG_4000
else:
    raise ValueError("num_labeled={}".format(run_config['num_labeled']))

config.update(run_config)
arg_str = get_arg_string(config)
set_GPUs([0])

print("Running arguments: [{}]".format(arg_str))
run_command = "{} ./train.py {}".format(PYTHON_EXE, arg_str).strip()
subprocess.call(run_command, shell=True)
Exemplo n.º 3
0
    "3c_Gz10_zdim10",
]

save_dir = abspath(
    join(RESULTS_DIR, "dSprites", "AAE", "auxiliary", "metrics_Eastwood"))
gpu = 1

for continuous_only in [True]:  # [True, False]:
    for LASSO_alpha in [
            0.002
    ]:  # [0.001, 0.002, 0.005, 0.01, 0.02, 0.05, 0.1, 0.2, 0.5]:
        for run_id in run_ids:
            # output_dir = abspath(join(RESULTS_DIR, "dSprites", "AAE", enc_dec_model, run_id))
            output_dir = abspath(join(RESULTS_DIR, "dSprites", "AAE", run_id))
            config = {
                "output_dir": output_dir,
                "save_dir": save_dir,
                "classifier": "LASSO",
                "LASSO_alpha": LASSO_alpha,
                "continuous_only": continuous_only,
                "LASSO_iters": 10000,
            }

            arg_str = get_arg_string(config)
            set_GPUs([gpu])

            print("Running arguments: [{}]".format(arg_str))
            run_command = "{} ./13a_metrics_Eastwood.py {}".format(
                PYTHON_EXE, arg_str).strip()
            subprocess.call(run_command, shell=True)
Exemplo n.º 4
0
    # "run": "9_VAE_beta10",
    # "run": "9a_VAE_beta10",
    # "run": "9b_VAE_beta10",
    # "run": "9c_VAE_beta10",
    # "kld_loss_coeff": 10,

    # "run": "9z_VAE_beta15",
    # "kld_loss_coeff": 15,

    # "run": "10_VAE_beta20",
    # "run": "10a_VAE_beta20",
    # "run": "10b_VAE_beta20",
    # "run": "10c_VAE_beta20",
    # "kld_loss_coeff": 20,

    # "run": "10z_VAE_beta25",
    # "kld_loss_coeff": 25,

    # "run": "11_VAE_beta30",
    # "run": "11b_VAE_beta30",
    # "kld_loss_coeff": 30,
    # ----------------------------------- #
    "force_rm_dir": True,
}

arg_str = get_arg_string(config)
set_GPUs([3])

print("Running arguments: [{}]".format(arg_str))
run_command = "{} ./_train.py {}".format(PYTHON_EXE, arg_str).strip()
subprocess.call(run_command, shell=True)