def __init__(self, ngpu, **kwargs):
super(netG_images, self).__init__()
self.ngpu = ngpu
pl = 0
self.L1 = kwargs['L1']
self.L2 = kwargs['L2']
self.K = kwargs['K']
self.arguments = kwargs['arguments']
self.l1 = nn.Linear(self.L1, self.K+pl, bias=True)
initializationhelper(self.l1, 'tanh')
self.l2 = nn.Linear(self.K+pl, self.L2, bias=True)
initializationhelper(self.l2, 'relu')
self.smooth_output = self.arguments.smooth_output
if self.smooth_output:
self.sml = nn.Conv2d(1, 1, 5, padding=2)
initializationhelper(self.sml, 'relu')
评论列表
文章目录