STEM: An approach to Multi-source Domain Adaptation with Guarantees
Introduction
This is the official implementation of “STEM: An approach to Multi-source Domain Adaptation with Guarantees”
Prerequisites
System Requirement:
- Anaconda3
- Cuda toolkit 10.0
Install other environment requirement by Anaconda3 following:
conda env create -f env.yml
Note: the environment requires tensorbayes
libs, however, available tensorbayes using Python 2.7. To fix the problem, please download tensorbayes, untar it and override to the env (stem) folder:
tar -xvf tensorbayes.tar
cp -rf ./tensorbayes/* /opt/conda/envs/stem/lib/python3.6/site-packages/tensorbayes/
Dataset Preparation
Please download and unzip the dataset and save all *.mat
file under ../datasets
. To save time computing, we extracted ResNet101 feature for Office-Caltech10 and provided as following:
Training
The config parameter to train model in config
folder, please check it before run. To train the model, simply run:
<div class="snippet-clipboard-content position-relative overflow-auto" data-snippet-clipboard-copy-content="python run_stem_ht_mimic_hs.py –config .yaml –trg_name “>
python run_stem_ht_mimic_hs.py --config
.yaml --trg_name