# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: 'Python 3.7.6 64-bit (''disenn'': conda)'
#     language: python
#     name: python37664bitdisennconda369c2df78b0e43dab968fa9e2f7dbd37
# ---

# %load_ext autoreload
# %autoreload 2

CONFIG = {
    "seed": 42,
    "debug": False,
    "device": 'cpu',
    "train": True,
    "download": False,
    "valid_freq": 2,
    "save_freq": 2
}

# +
config = {
    "exp_name": 'celeba_test',
    "epochs": 1,
    "data": 'celeba',
    "target": 'Male',
    "conceptizer": 'VaeConceptizer',
    "num_concepts": 5,
    "beta": 4,
    "parameterizer": 'ConvParameterizer',
    "num_classes": 2,
    "robustness_reg": 1e-4,
    "aggregator": 'SumAggregator',
    "concept_loss": 'bvae_loss',
    "robustness_loss": 'celeba_robustness_loss',
    "learning_rate": 1e-3,
    "batch_size": 16,
    "load_checkpoint": 'Epoch[0]-Step[0].pt',
    "pretrain_epochs": 0,
    "pre-beta": 1
}

CONFIG.update(config)
# -

from disenn.trainer import DiSENN_Trainer

trainer = DiSENN_Trainer(CONFIG)

trainer.run()



StarcoderdataJupyterScriptsDedupFiltered