|
from .base_options import BaseOptions |
|
|
|
|
|
class TestOptions(BaseOptions): |
|
""" |
|
继承BaseOptions |
|
""" |
|
|
|
def initialize(self, parser): |
|
parser = BaseOptions.initialize(self, parser) |
|
|
|
self.isTrain = False |
|
|
|
parser.set_defaults(load_size=parser.get_default("crop_size")) |
|
parser.set_defaults(model="test") |
|
parser.set_defaults(no_dropout=True) |
|
|
|
parser.set_defaults(name="horse2zebra") |
|
parser.set_defaults(dataroot=r"datasets\horse2zebra\testA") |
|
|
|
|
|
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") |
|
|
|
parser.add_argument("--eval", action="store_true", help="use eval mode during test time.") |
|
parser.add_argument("--num_test", type=int, default=50, help="how many test images to run") |
|
return parser |
|
|