Skip to content

Commit

Permalink
Update networks.py
Browse files Browse the repository at this point in the history
  • Loading branch information
junyanz authored Jul 9, 2019
1 parent 8a61754 commit 41931e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions models/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,9 +549,9 @@ def __init__(self, input_nc, ndf=64, n_layers=3, norm_layer=nn.BatchNorm2d):
"""
super(NLayerDiscriminator, self).__init__()
if type(norm_layer) == functools.partial: # no need to use bias as BatchNorm2d has affine parameters
use_bias = norm_layer.func != nn.BatchNorm2d
use_bias = norm_layer.func == nn.InstanceNorm2d
else:
use_bias = norm_layer != nn.BatchNorm2d
use_bias = norm_layer == nn.InstanceNorm2d

kw = 4
padw = 1
Expand Down Expand Up @@ -596,9 +596,9 @@ def __init__(self, input_nc, ndf=64, norm_layer=nn.BatchNorm2d):
"""
super(PixelDiscriminator, self).__init__()
if type(norm_layer) == functools.partial: # no need to use bias as BatchNorm2d has affine parameters
use_bias = norm_layer.func != nn.InstanceNorm2d
use_bias = norm_layer.func == nn.InstanceNorm2d
else:
use_bias = norm_layer != nn.InstanceNorm2d
use_bias = norm_layer == nn.InstanceNorm2d

self.net = [
nn.Conv2d(input_nc, ndf, kernel_size=1, stride=1, padding=0),
Expand Down

0 comments on commit 41931e2

Please sign in to comment.