Huaisheng Zhu, Teng Xiao, Zhimeng Guo
- Install the packages listed in
requirements.txt
- Download the two datasets into the same folder:
- CIFAR-10-C (Hendrycks and Dietterich) from this repository, which links to this shared storage.
- CIFAR-10.1 (Recht et al.) from this repository.
- Set the data folder to where the datasets are stored by editing:
--dataroot
argument inmain.py
.--dataroot
argument inbaseline.py
.dataroot
variable inscript_test_c10.py
.
- Run
script.sh
for the main results (TTT-personalized), and./baseliness/script_baseline.sh
for the baseline results. - The results are stored in the respective folders in
results/
and./baseliness/results
. - Once everything is finished, the results can be compiled and visualized with the following utilities:
show_table.py
parses the results into tables and prints them.show_plot.py
makes bar plots, and prints the tables in latex format; requires first runningshow_table.py
.show_grad.py
makes the gradient correlation plot../baseliness/show_table.py
parses the baseline results into tables and prints them../baseliness/show_plot.py
makes bar plots for baseline results, and prints the tables in latex format; requires first runningshow_table.py
../baseliness/show_grad.py
makes the gradient correlation plot for baselines.
- The whole training process may take a Tesla V100 several days. So please change the
CUDA_VISIBLE_DEVICES
inscript.sh
and./baseliness/script_baseline.sh
to select a suitable GPU.