diff options
| author | Matt Cooper <matthew_cooper@brown.edu> | 2016-08-12 20:36:02 -0400 |
|---|---|---|
| committer | Matt Cooper <matthew_cooper@brown.edu> | 2016-08-12 20:36:02 -0400 |
| commit | 856fc1973b0d63ef1841e37c3391dc49484e59a8 (patch) | |
| tree | 3c32c51ea8103a96ce303d4d868cc3c283b51a42 /Code | |
| parent | 42774cdcfec30be73e7ec6eedb82a8c53af4a857 (diff) | |
Made sure c.TEST_DIR exists before running
Diffstat (limited to 'Code')
| -rw-r--r-- | Code/avg_runner.py | 5 | ||||
| -rw-r--r-- | Code/constants.py | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/Code/avg_runner.py b/Code/avg_runner.py index 5bf1e90..18bc592 100644 --- a/Code/avg_runner.py +++ b/Code/avg_runner.py @@ -1,6 +1,7 @@ import tensorflow as tf import getopt import sys +import os from utils import get_train_batch, get_test_batch import constants as c @@ -158,6 +159,10 @@ def main(): if opt == '--model_save_freq': c.MODEL_SAVE_FREQ = int(arg) + # set test frame dimensions + assert os.path.exists(c.TEST_DIR) + c.TEST_HEIGHT, c.TEST_WIDTH = c.get_test_frame_dims() + ## # Init and run the predictor ## diff --git a/Code/constants.py b/Code/constants.py index afe8f9d..e0c2485 100644 --- a/Code/constants.py +++ b/Code/constants.py @@ -75,8 +75,8 @@ MOVEMENT_THRESHOLD = 100 # total number of processed clips in TRAIN_DIR_CLIPS NUM_CLIPS = len(glob(TRAIN_DIR_CLIPS + '*')) -# the height and width of the full frames to test on -TEST_HEIGHT, TEST_WIDTH = get_test_frame_dims() +# the height and width of the full frames to test on. Set in avg_runner.py main. +TEST_HEIGHT, TEST_WIDTH = 0 # the height and width of the patches to train on TRAIN_HEIGHT = TRAIN_WIDTH = 32 |
