KaiyangZhou / Dassl.pytorch

A PyTorch toolbox for domain generalization, domain adaptation and semi-supervised learning.
MIT License
1.17k stars 169 forks source link

Allows users to run the source code directly without installation. #24

Closed siaimes closed 3 years ago

siaimes commented 3 years ago

Allows users to run the source code directly without installation.

siaimes commented 3 years ago
git clone https://github.com/KaiyangZhou/Dassl.pytorch.git
cd Dassl.pytorch

CUDA_VISIBLE_DEVICES=0 python main.py \
--root $DATA \
--trainer SourceOnly \
--source-domains amazon \
--target-domains webcam \
--dataset-config-file configs/datasets/da/office31.yaml \
--config-file configs/trainers/da/source_only/office31.yaml \
--output-dir output/source_only_office31

After this PR is merged, the source code can be run in this way without installation, which is more convenient for users to expand.

KaiyangZhou commented 3 years ago

Thanks for suggestion.

The purpose of installing this package is to allow users to develop their own code in a more independent way without changing the underlying source code. See example projects here and here.

The installtion via python setup.py develop also allows changes made to the source code to take effect.