pytorch, yaml, tensorboard (from https://github.com/dmlc/tensorboard), and tensorboardX (from https://github.com/lanpa/tensorboard-pytorch).
The code base was developed using Anaconda with the following packages.
pip install tensorboard tensorboardX;
- master_train.py : 使用這個檔案來執行訓練;如果只想進行 Disentangle 的話,可把Flowing 部分 mark 掉執行。
- master_trainer.py : 整個模型架構的組合,以及loss function的設定。主要是用
MASTER_Trainer
。 - master_networks.py : 網路的component。
- master_test.py : 在 inference 時使用。
- utils .py : 工具function
- Note.md : 實驗記錄的部分 & 訓練command
-
Prepare dataset
- 將 dataset 分成 trainA / trainB 和 testA/testB,放到
datasets
- 將 dataset 分成 trainA / trainB 和 testA/testB,放到
-
Setup the yaml file.
- Check out
configs/style_shoes_label_floder_OO.yaml
for folder-based dataset organization.
- Check out
-
開啟 Visdom
python -m visdom.server
-
Start training
python master_train.py --config configs/style_shoes_label_folder_OO.yaml --trainer MASTER
-
Intermediate image outputs and model binary files are stored in
outputs/style_shoes_label_floder_OO
First, download the pretrained models and put them in models
folder.