diff --git a/libs/logs/log.py b/libs/logs/log.py index e5dcb78..9ab7cab 100644 --- a/libs/logs/log.py +++ b/libs/logs/log.py @@ -4,9 +4,12 @@ import logging import libs.configs.config_v1 as cfg +import os def LOG(mssg): + if not os.path.exists(cfg.FLAGS.train_dir): + os.makedirs(cfg.FLAGS.train_dir) logging.basicConfig(filename=cfg.FLAGS.train_dir + '/maskrcnn.log', level=logging.INFO, datefmt='%m/%d/%Y %I:%M:%S %p', format='%(asctime)s %(message)s') - logging.info(mssg) \ No newline at end of file + logging.info(mssg) diff --git a/train/train.py b/train/train.py index c171b92..1f6a309 100644 --- a/train/train.py +++ b/train/train.py @@ -227,7 +227,7 @@ def train(): cropped_rois = tf.get_collection('__CROPPED__')[0] transposed = tf.get_collection('__TRANSPOSED__')[0] - gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.95) + gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.85) sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options)) init_op = tf.group( tf.global_variables_initializer(),