YakirOz/transfer_learning_reconstruction

3

stars

1

commits

Python

primary language

Sep 17, 2024

updated

README

Reconstructing Training Data From Real-World
Models Trained with Transfer Learning

PyTorch Lightning Config: Hydra Template
Paper

Description

Source code for the paper "Reconstructing Training Data From Real-World Models Trained with Transfer Learning"

Setup

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.

Training

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

Reconstruction

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.

Final evaluation of the reconstruction

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

Citation

@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}
}

Contributors

YakirOz

1 commits

YakirOz/transfer_learning_reconstruction

3

stars

1

commits

Python

primary language

Sep 17, 2024

updated

README

Reconstructing Training Data From Real-World
Models Trained with Transfer Learning

PyTorch Lightning Config: Hydra Template
Paper

Description

Source code for the paper "Reconstructing Training Data From Real-World Models Trained with Transfer Learning"

Setup

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.

Training

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

Reconstruction

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.

Final evaluation of the reconstruction

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

Citation

@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}
}

Contributors

YakirOz

1 commits

Languages

Python

100.0%