diff options
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | scripts/train_cyclegan.sh | 2 | ||||
| -rw-r--r-- | util/visualizer.py | 4 |
3 files changed, 4 insertions, 4 deletions
@@ -95,7 +95,7 @@ More example scripts can be found at `scripts` directory. ## Training/test Details - See `options/train_options.py` and `options/base_options.py` for training flags; see `optoins/test_options.py` and `options/base_options.py` for test flags. -- CPU/GPU (default `--gpu_ids 0`): Set `--gpu_ids -1` to use CPU mode; set `--gpu_ids 0,1,2` for multi-GPU mode. +- CPU/GPU (default `--gpu_ids 0`): Set `--gpu_ids -1` to use CPU mode; set `--gpu_ids 0,1,2` for multi-GPU mode. You need a large batch size (e.g. `--batchSize 32`) to benefit from multiple gpus. - During training, the current results can be viewed using two methods. First, if you set `--display_id` > 0, the results and loss plot will be shown on a local graphics web server launched by [visdom](https://github.com/facebookresearch/visdom). To do this, you should have visdom installed and a server running by the command `python -m visdom.server`. The default server URL is `http://localhost:8097`. `display_id` corresponds to the window ID that is displayed on the `visdom` server. The `visdom` display functionality is turned on by default. To avoid the extra overhead of communicating with `visdom` set `--display_id 0`. Second, the intermediate results are saved to `[opt.checkpoints_dir]/[opt.name]/web/` as an HTML file. To avoid this, set `--no_html`. diff --git a/scripts/train_cyclegan.sh b/scripts/train_cyclegan.sh index 9da219f..e454f9c 100644 --- a/scripts/train_cyclegan.sh +++ b/scripts/train_cyclegan.sh @@ -1 +1 @@ -python train.py --dataroot ./datasets/maps --name maps_cyclegan --model cycle_gan +python train.py --dataroot ./datasets/maps --name maps_cyclegan --model cycle_gan --pool_size 50 diff --git a/util/visualizer.py b/util/visualizer.py index bca74b2..9a6da2a 100644 --- a/util/visualizer.py +++ b/util/visualizer.py @@ -9,7 +9,8 @@ class Visualizer(): def __init__(self, opt): # self.opt = opt self.display_id = opt.display_id - self.use_html = not opt.no_html + self.use_html = opt.isTrain and not opt.no_html + self.win_size = opt.display_winsize self.name = opt.name if self.display_id > 0: import visdom @@ -18,7 +19,6 @@ class Visualizer(): if self.use_html: self.web_dir = os.path.join(opt.checkpoints_dir, opt.name, 'web') self.img_dir = os.path.join(self.web_dir, 'images') - self.win_size = opt.display_winsize print('create web directory %s...' % self.web_dir) util.mkdirs([self.web_dir, self.img_dir]) |
