python 3 pytorch implementation of DANN
Last updated Jun 12, 2026
577
Stars
105
Forks
3
Issues
0
Stars/day
Attention Score
28
Language breakdown
Python 96.3%
Dockerfile 3.7%
โธ Files
click to expand
README
This is a pytorch implementation of the paper Unsupervised Domain Adaptation by Backpropagation
Environment
- Pytorch 1.6
- Python 3.8.5
Network Structure

Dataset
First, download target dataset mnistm from pan.quark.com or Google Drive, and put mnistm dataset into dataset/mnistm, the structure is as follows:
--dataset--mnistm--mnistm_train
|--mnistmtest
|--mnistmtrain_labels.txt
|--mnistmtest_labels.txt
|--.gitkeep
Training
Then, run python main.py
Docker
- build image
docker build -t pytorch_dann .
- run docker container
docker run -it --runtime=nvidia \
-u $(id -u):$(id -g) \
-v /YOUR/DANN/PROJECT/dataset:/DANN/dataset \
-v /YOUR/DANN/PROJECT/models:/DANN/models \
pytorch_dann:latest \
python main.py
๐ More in this category