From a2792308dcbdcd946337aa2106760a81d9899d88 Mon Sep 17 00:00:00 2001 From: Andrew Stromme Date: Tue, 11 Jul 2017 22:00:06 -0700 Subject: [PATCH 1/2] create logging directory if needed --- libs/logs/log.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) From 24cf5dd043921f735dcd9ea5a620fcdee2661d47 Mon Sep 17 00:00:00 2001 From: Andrew Stromme Date: Wed, 12 Jul 2017 14:32:00 -0700 Subject: [PATCH 2/2] Fixes gpu OOM on my GTX 1070 --- train/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(),