diff options
| author | Matt Cooper <matthew_cooper@brown.edu> | 2016-08-12 19:54:56 -0400 |
|---|---|---|
| committer | Matt Cooper <matthew_cooper@brown.edu> | 2016-08-12 19:54:56 -0400 |
| commit | 6e6923a0e11d3b9bcaf3ceae390e499569e6f8a7 (patch) | |
| tree | aa7698bf29ea97228fcd90d9a2609c411dded40f | |
| parent | df4b468523a7e4dedd0a116f4e455b7aa6ab7184 (diff) | |
Updated cmd line options
| -rw-r--r-- | Code/avg_runner.py | 12 | ||||
| -rw-r--r-- | Code/process_data.py | 12 |
2 files changed, 14 insertions, 10 deletions
diff --git a/Code/avg_runner.py b/Code/avg_runner.py index 5de994b..5bf1e90 100644 --- a/Code/avg_runner.py +++ b/Code/avg_runner.py @@ -104,12 +104,12 @@ def usage(): print '-n/--name= <Subdirectory of ../Data/Save/*/ in which to save output of this run>' print '-O/--overwrite (Overwrites all previous data for the model with this save name)' print '-T/--test_only (Only runs a test step -- no training)' - print '-H/--help (prints usage)' - print '--stats_freq= <how often to print loss/train error stats, in # steps>' - print '--summary_freq= <how often to save loss/error summaries, in # steps>' - print '--img_save_freq= <how often to save generated images, in # steps>' - print '--test_freq= <how often to test the model on test data, in # steps>' - print '--model_save_freq= <how often to save the model, in # steps>' + print '-H/--help (Prints usage)' + print '--stats_freq= <How often to print loss/train error stats, in # steps>' + print '--summary_freq= <How often to save loss/error summaries, in # steps>' + print '--img_save_freq= <How often to save generated images, in # steps>' + print '--test_freq= <How often to test the model on test data, in # steps>' + print '--model_save_freq= <How often to save the model, in # steps>' def main(): diff --git a/Code/process_data.py b/Code/process_data.py index 170959a..446de91 100644 --- a/Code/process_data.py +++ b/Code/process_data.py @@ -28,12 +28,13 @@ def process_training_data(num_clips): def usage(): print 'Options:' - print '-n/--num_clips= <# clips to process for training>' + print '-n/--num_clips= <# clips to process for training> (Default = 5000000)' print '-t/--train_dir= <Directory of full training frames>' print '-c/--clips_dir= <Save directory for processed clips>' print " (I suggest making this a hidden dir so the filesystem doesn't freeze" print " with so many files. DON'T `ls` THIS DIRECTORY!)" - print '-o/--overwrite (Overwrites the previous data in the training dir)' + print '-o/--overwrite (Overwrites the previous data in clips_dir)' + print '-H/--help (Prints usage)' def main(): @@ -44,8 +45,8 @@ def main(): num_clips = 5000000 try: - opts, _ = getopt.getopt(sys.argv[1:], 'n:t:c:o', - ['num_clips=', 'train_dir=', 'clips_dir=', 'overwrite']) + opts, _ = getopt.getopt(sys.argv[1:], 'n:t:c:oH', + ['num_clips=', 'train_dir=', 'clips_dir=', 'overwrite', 'help']) except getopt.GetoptError: usage() sys.exit(2) @@ -59,6 +60,9 @@ def main(): c.TRAIN_DIR_CLIPS = c.get_dir(arg) if opt in ('-o', '--overwrite'): c.clear_dir(c.TRAIN_DIR_CLIPS) + if opt in ('-H', '--help'): + usage() + sys.exit(2) ## # Process data for training |
