When I define the option "--netD" or "-netD2" as 'basic_128' or 'basic_256', the function "define_D" should use the parameter "nl_layer", but it report an error.
if netD == 'basic_128':
net = D_NLayers(input_nc, ndf, n_layers=2, norm_layer=norm_layer, nl_layer=nl_layer)
elif netD == 'basic_256':
net = D_NLayers(input_nc, ndf, n_layers=3, norm_layer=norm_layer, nl_layer=nl_layer)
elif netD == 'basic_128_multi':
net = D_NLayersMulti(input_nc=input_nc, ndf=ndf, n_layers=2, norm_layer=norm_layer, num_D=num_Ds)
elif netD == 'basic_256_multi':
net = D_NLayersMulti(input_nc=input_nc, ndf=ndf, n_layers=3, norm_layer=norm_layer, num_D=num_Ds)
else:
raise NotImplementedError('Discriminator model name [%s] is not recognized' % net)
return init_net(net, init_type, init_gain, gpu_ids)
When I define the option "--netD" or "-netD2" as 'basic_128' or 'basic_256', the function "define_D" should use the parameter "nl_layer", but it report an error.
The condition judge part of function "define_D" is like this: