윤영준 윤영준 2023-07-04
fixed a mistake of putting server termination code before excuting and declaring server process
@0e2104de24b5e5f308b1cb2fa2979bd39ca9ef15
train.py
--- train.py
+++ train.py
@@ -22,9 +22,6 @@
 from tools.dataloader import ImagePairDataset
 
 
-
-
-
 # this function is from https://github.com/eriklindernoren/PyTorch-GAN/blob/master/implementations/dualgan/models.py
 # MIT license
 def weights_init_normal(m):
@@ -83,6 +80,7 @@
 
 # ------visdom visualizer ----------
 server_process = subprocess.Popen("python -m visdom.server", shell=True)
+# to ensure the visdom server process must stop whenever the script is terminated.
 def cleanup():
     server_process.terminate()
 atexit.register(cleanup)
Add a comment
List