changeset 343:82dae7c46046

Last few bugfixes before launching
author fsavard
date Sun, 18 Apr 2010 11:54:57 -0400
parents b25ad1670ff7
children ed1c0830681e
files deep/crbm/mnist_crbm.py deep/crbm/utils.py
diffstat 2 files changed, 8 insertions(+), 5 deletions(-) [+]
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
--- a/deep/crbm/utils.py	Sun Apr 18 11:47:35 2010 -0400
+++ b/deep/crbm/utils.py	Sun Apr 18 11:54:57 2010 -0400
@@ -3,6 +3,7 @@
 
 from __future__ import with_statement
 
+import jobman
 from jobman import DD
 
 from pylearn.io.seriestables import *