diff options
| author | Taesung Park <taesung_park@berkeley.edu> | 2017-07-17 10:43:08 -0700 |
|---|---|---|
| committer | Taesung Park <taesung_park@berkeley.edu> | 2017-07-17 10:43:08 -0700 |
| commit | 1d60960b5038653ae841370d8bf032b1b703e17a (patch) | |
| tree | 36e7431bd02df44648cd196d15d78ef03fffda1e | |
| parent | 23eb65de64e62141258acc258c930c6a63daaf42 (diff) | |
changed the default option to use dropout
| -rw-r--r-- | models/cycle_gan_model.py | 4 | ||||
| -rw-r--r-- | models/pix2pix_model.py | 2 | ||||
| -rw-r--r-- | models/test_model.py | 2 | ||||
| -rw-r--r-- | options/base_options.py | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/models/cycle_gan_model.py b/models/cycle_gan_model.py index 8748a62..b3c52c7 100644 --- a/models/cycle_gan_model.py +++ b/models/cycle_gan_model.py @@ -28,9 +28,9 @@ class CycleGANModel(BaseModel): # Code (paper): G_A (G), G_B (F), D_A (D_Y), D_B (D_X) self.netG_A = networks.define_G(opt.input_nc, opt.output_nc, - opt.ngf, opt.which_model_netG, opt.norm, opt.use_dropout, self.gpu_ids) + opt.ngf, opt.which_model_netG, opt.norm, not opt.no_dropout, self.gpu_ids) self.netG_B = networks.define_G(opt.output_nc, opt.input_nc, - opt.ngf, opt.which_model_netG, opt.norm, opt.use_dropout, self.gpu_ids) + opt.ngf, opt.which_model_netG, opt.norm, not opt.no_dropout, self.gpu_ids) if self.isTrain: use_sigmoid = opt.no_lsgan diff --git a/models/pix2pix_model.py b/models/pix2pix_model.py index 3ab45fd..a524f2c 100644 --- a/models/pix2pix_model.py +++ b/models/pix2pix_model.py @@ -24,7 +24,7 @@ class Pix2PixModel(BaseModel): # load/define networks self.netG = networks.define_G(opt.input_nc, opt.output_nc, opt.ngf, - opt.which_model_netG, opt.norm, opt.use_dropout, self.gpu_ids) + opt.which_model_netG, opt.norm, not opt.no_dropout, self.gpu_ids) if self.isTrain: use_sigmoid = opt.no_lsgan self.netD = networks.define_D(opt.input_nc + opt.output_nc, opt.ndf, diff --git a/models/test_model.py b/models/test_model.py index 65aa088..03aef65 100644 --- a/models/test_model.py +++ b/models/test_model.py @@ -16,7 +16,7 @@ class TestModel(BaseModel): self.netG = networks.define_G(opt.input_nc, opt.output_nc, opt.ngf, opt.which_model_netG, - opt.norm, opt.use_dropout, + opt.norm, not opt.no_dropout, self.gpu_ids) which_epoch = opt.which_epoch self.load_network(self.netG, 'G', which_epoch) diff --git a/options/base_options.py b/options/base_options.py index 275c8fc..834a18c 100644 --- a/options/base_options.py +++ b/options/base_options.py @@ -35,7 +35,7 @@ class BaseOptions(): self.parser.add_argument('--display_port', type=int, default=8097, help='visdom port of the web display') self.parser.add_argument('--display_single_pane_ncols', type=int, default=0, help='if positive, display all images in a single visdom web panel with certain number of images per row.') self.parser.add_argument('--identity', type=float, default=0.0, help='use identity mapping. Setting identity other than 1 has an effect of scaling the weight of the identity mapping loss. For example, if the weight of the identity loss should be 10 times smaller than the weight of the reconstruction loss, please set optidentity = 0.1') - self.parser.add_argument('--use_dropout', action='store_true', help='use dropout for the generator') + self.parser.add_argument('--no_dropout', action='store_true', help='no dropout for the generator') self.parser.add_argument('--max_dataset_size', type=int, default=float("inf"), help='Maximum number of samples allowed per dataset. If the dataset directory contains more than max_dataset_size, only a subset is loaded.') self.parser.add_argument('--resize_or_crop', type=str, default='resize_and_crop', help='scaling and cropping of images at load time [resize_and_crop|crop|scale_width|scale_width_and_crop]') self.parser.add_argument('--no_flip', action='store_true', help='if specified, do not flip the images for data argumentation') |
