diff --git a/fluid/PaddleCV/video/.gitignore b/fluid/PaddleCV/video/.gitignore index 5bd3b1700740dd01bc966a0233e2e87cd5e5c9f6..c06b6205e64969ad19649c8c55e18d82d147da09 100644 --- a/fluid/PaddleCV/video/.gitignore +++ b/fluid/PaddleCV/video/.gitignore @@ -1,4 +1,4 @@ -data +dataset checkpoints output* *.pyc diff --git a/fluid/PaddleCV/video/tools/train_utils.py b/fluid/PaddleCV/video/tools/train_utils.py index 986c239d7cf55ca31dbbd74a5f333ccb56903526..ad2b10f94827dacf1aad4822c5ce4dcb13fa94e9 100644 --- a/fluid/PaddleCV/video/tools/train_utils.py +++ b/fluid/PaddleCV/video/tools/train_utils.py @@ -80,7 +80,7 @@ def train_without_pyreader(exe, train_prog, train_exe, train_reader, train_feede format(epoch, np.mean(epoch_periods))) save_model(exe, train_prog, save_dir, save_model_name, "_epoch{}".format(epoch)) - if test_exe and (epoch + 1) % valid_interval == 0: + if test_exe and valid_interval > 0 and (epoch + 1) % valid_interval == 0: test_without_pyreader(test_exe, test_reader, test_feeder, test_fetch_list, test_metrics, log_interval) @@ -119,7 +119,7 @@ def train_with_pyreader(exe, train_prog, train_exe, train_pyreader, \ format(epoch, np.mean(epoch_periods))) save_model(exe, train_prog, save_dir, save_model_name, "_epoch{}".format(epoch)) - if test_exe and valid_interval > 0: + if test_exe and valid_interval > 0 and (epoch + 1) % valid_interval == 0: test_with_pyreader(test_exe, test_pyreader, test_fetch_list, test_metrics, log_interval) finally: diff --git a/fluid/PaddleCV/video/train.py b/fluid/PaddleCV/video/train.py index 99856623e927dd00e9c79ebe5d6cde1e21d7512b..18fd188bea5acb5f7860e9258ecd4eab63ce4240 100755 --- a/fluid/PaddleCV/video/train.py +++ b/fluid/PaddleCV/video/train.py @@ -81,11 +81,6 @@ def parse_args(): type=int, default=1, help='validation epoch interval, 0 for no validation.') - parser.add_argument( - '--save-interval', - type=int, - default=1, - help='save checkpoints epoch interval.') parser.add_argument( '--save-dir', type=str,