
fixed a mistake of putting server termination code before excuting and declaring server process
@0e2104de24b5e5f308b1cb2fa2979bd39ca9ef15
--- train.py
+++ train.py
... | ... | @@ -22,9 +22,6 @@ |
22 | 22 |
from tools.dataloader import ImagePairDataset |
23 | 23 |
|
24 | 24 |
|
25 |
- |
|
26 |
- |
|
27 |
- |
|
28 | 25 |
# this function is from https://github.com/eriklindernoren/PyTorch-GAN/blob/master/implementations/dualgan/models.py |
29 | 26 |
# MIT license |
30 | 27 |
def weights_init_normal(m): |
... | ... | @@ -83,6 +80,7 @@ |
83 | 80 |
|
84 | 81 |
# ------visdom visualizer ---------- |
85 | 82 |
server_process = subprocess.Popen("python -m visdom.server", shell=True) |
83 |
+# to ensure the visdom server process must stop whenever the script is terminated. |
|
86 | 84 |
def cleanup(): |
87 | 85 |
server_process.terminate() |
88 | 86 |
atexit.register(cleanup) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?