Source code for the paper "Reconstructing Training Data From Real-World Models Trained with Transfer Learning"
Install dependencies
# clone project
git clone https://github.com/YakirOz/transfer_learning_reconstruction
cd transfer_learning_reconstruction
# create conda environment
conda env create -f env.yaml
conda activate envdr
# install colorlog
pip install hydra_colorlog --upgrade
Under configs/logger/wandb.yaml input the entity and project of your choosing.
Train a model with chosen experiment configuration from configs/experiment/
python src/train.py experiment=experiment_name.yaml
you can also change configuration entries like the number of training iteration straight from the command line:
python src/train.py experiment=experiment_name.yaml num_iterations=100000
Put the ckpt_path of the trained model (relative) in the experiment's yaml file (under "ckpt_path:" in the experiment's yaml file) and reconstruct (one time):
python src/reconstruct.py experiment=experiment_name.yaml
Once you made sure reconstruction is able to run, you should now run a sweep using
wandb sweep src/wandb_sweep.yaml
Note: Doing a wandb sweep is necessary for the evaluation step.
Once you are done with the sweep, plug sweep's id into the experiment's yaml file and run:
python src/eval.py experiment=experiment_name.yaml
@article{oz2024reconstructing,
title={Reconstructing Training Data From Real World Models Trained with Transfer Learning},
author={Oz, Yakir and Yehudai, Gilad and Vardi, Gal and Antebi, Itai and Irani, Michal and Haim, Niv},
journal={arXiv preprint arXiv:2407.15845},
year={2024}
}
1 commits
Python
100.0%
Source code for the paper "Reconstructing Training Data From Real-World Models Trained with Transfer Learning"
Install dependencies
# clone project
git clone https://github.com/YakirOz/transfer_learning_reconstruction
cd transfer_learning_reconstruction
# create conda environment
conda env create -f env.yaml
conda activate envdr
# install colorlog
pip install hydra_colorlog --upgrade
Under configs/logger/wandb.yaml input the entity and project of your choosing.
Train a model with chosen experiment configuration from configs/experiment/
python src/train.py experiment=experiment_name.yaml
you can also change configuration entries like the number of training iteration straight from the command line:
python src/train.py experiment=experiment_name.yaml num_iterations=100000
Put the ckpt_path of the trained model (relative) in the experiment's yaml file (under "ckpt_path:" in the experiment's yaml file) and reconstruct (one time):
python src/reconstruct.py experiment=experiment_name.yaml
Once you made sure reconstruction is able to run, you should now run a sweep using
wandb sweep src/wandb_sweep.yaml
Note: Doing a wandb sweep is necessary for the evaluation step.
Once you are done with the sweep, plug sweep's id into the experiment's yaml file and run:
python src/eval.py experiment=experiment_name.yaml
@article{oz2024reconstructing,
title={Reconstructing Training Data From Real World Models Trained with Transfer Learning},
author={Oz, Yakir and Yehudai, Gilad and Vardi, Gal and Antebi, Itai and Irani, Michal and Haim, Niv},
journal={arXiv preprint arXiv:2407.15845},
year={2024}
}
1 commits
Python
100.0%