diff deep/crbm/mnist_crbm.py @ 343:82dae7c46046

Last few bugfixes before launching
author fsavard
date Sun, 18 Apr 2010 11:54:57 -0400
parents b25ad1670ff7
children ed1c0830681e
line wrap: on
line diff
--- a/deep/crbm/mnist_crbm.py	Sun Apr 18 11:47:35 2010 -0400
+++ b/deep/crbm/mnist_crbm.py	Sun Apr 18 11:54:57 2010 -0400
@@ -32,11 +32,13 @@
 
 import utils
 
-if not os.path.exists(IMAGE_OUTPUT_DIR):
-    os.mkdir(IMAGE_OUTPUT_DIR)
-elif os.path.isfile(IMAGE_OUTPUT_DIR):
-    print "IMAGE_OUTPUT_DIR is not a directory!"
-    sys.exit(1)
+if not (len(sys.argv) > 1 and sys.argv[1] in \
+            ('jobman_insert',)):
+    if not os.path.exists(IMAGE_OUTPUT_DIR):
+        os.mkdir(IMAGE_OUTPUT_DIR)
+    elif os.path.isfile(IMAGE_OUTPUT_DIR):
+        print "IMAGE_OUTPUT_DIR is not a directory!"
+        sys.exit(1)
 
 #def filename_from_time(suffix):
 #    import datetime