Pytorch implementation of Single Domain Generalization via Diversity Probe.
- Linux
- Python 3.8
- Pytorch 1.8.0
- Torchvision 0.9.0
- NVIDIA GPU + CUDA CuDNN
Note: You need to download the data if you wish to train your own model.
Download the digits dataset from this link[BaiDuYunDisk] and its extracted code: xcl3
. Please extract it inside the data
directory
cd data
unzip digits.zip
cd ..
Pretrained task model is available at this link[BaiDuYunDisk] and its extracted code:dp46
. Download and extract it in the models_pth
directory.
In runDivPro.py
:
- Specify the output directory to save the results in
--dir
. - Turn on the evaluation in
--eval
- Run
python runDivPro.py --dir SAVE_DIR --eval True
- Specify the output directory to save the results in
--dir
. - Run
python runDivPro.py --dir SAVE_DIR
We thank the following authors for releasing their source code, data and models: