summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjunyanz <junyanz@berkeley.edu>2017-04-22 03:45:58 -0700
committerjunyanz <junyanz@berkeley.edu>2017-04-22 03:45:58 -0700
commit318936a415814e4b7b7affd3efd69c2aa1331074 (patch)
treed7c2902b3680991a3f2da76c68a4df9254b38d36
parent8f72c929868a0be6ff132614b0a161c3ad63d778 (diff)
update README & fix test-time issues in visualizer
-rw-r--r--README.md2
-rw-r--r--scripts/train_cyclegan.sh2
-rw-r--r--util/visualizer.py4
3 files changed, 4 insertions, 4 deletions
diff --git a/README.md b/README.md
index fbb538e..331ae54 100644
--- a/README.md
+++ b/README.md
@@ -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])