MCPcopy Index your code
hub / github.com/thygate/stable-diffusion-webui-depthmap-script / TestOptions

Class TestOptions

pix2pix/options/test_options.py:4–22  ·  view source on GitHub ↗

This class includes test options. It also includes shared options defined in BaseOptions.

Source from the content-addressed store, hash-verified

2
3
4class TestOptions(BaseOptions):
5 """This class includes test options.
6
7 It also includes shared options defined in BaseOptions.
8 """
9
10 def initialize(self, parser):
11 parser = BaseOptions.initialize(self, parser) # define shared options
12 parser.add_argument('--aspect_ratio', type=float, default=1.0, help='aspect ratio of result images')
13 parser.add_argument('--phase', type=str, default='test', help='train, val, test, etc')
14 # Dropout and Batchnorm has different behavioir during training and test.
15 parser.add_argument('--eval', action='store_true', help='use eval mode during test time.')
16 parser.add_argument('--num_test', type=int, default=50, help='how many test images to run')
17 # rewrite devalue values
18 parser.set_defaults(model='pix2pix4depth')
19 # To avoid cropping, the load_size should be the same as crop_size
20 parser.set_defaults(load_size=parser.get_default('crop_size'))
21 self.isTrain = False
22 return parser

Callers 2

load_modelsMethod · 0.90
test.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected