From 5fd11c27a1b9a5d79ef4ab879146c6b065f6e2a8 Mon Sep 17 00:00:00 2001 From: junyanz Date: Sat, 23 May 2020 20:24:51 -0400 Subject: [PATCH] remove unused flag ntest --- options/test_options.py | 1 - test.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/options/test_options.py b/options/test_options.py index c85c99601cb..3f42c01eaca 100644 --- a/options/test_options.py +++ b/options/test_options.py @@ -9,7 +9,6 @@ class TestOptions(BaseOptions): def initialize(self, parser): parser = BaseOptions.initialize(self, parser) # define shared options - parser.add_argument('--ntest', type=int, default=float("inf"), help='# of test examples.') parser.add_argument('--results_dir', type=str, default='./results/', help='saves results here.') parser.add_argument('--aspect_ratio', type=float, default=1.0, help='aspect ratio of result images') parser.add_argument('--phase', type=str, default='test', help='train, val, test, etc') diff --git a/test.py b/test.py index 9281a992d50..b3110490345 100644 --- a/test.py +++ b/test.py @@ -1,10 +1,10 @@ """General-purpose test script for image-to-image translation. Once you have trained your model with train.py, you can use this script to test the model. -It will load a saved model from --checkpoints_dir and save the results to --results_dir. +It will load a saved model from '--checkpoints_dir' and save the results to '--results_dir'. It first creates model and dataset given the option. It will hard-code some parameters. -It then runs inference for --num_test images and save results to an HTML file. +It then runs inference for '--num_test' images and save results to an HTML file. Example (You need to train models first or download pre-trained models from our website): Test a CycleGAN model (both sides):