def propagate(self, X, num_train=None, atype='relu'):
"""Propagate, return binary output of fake/real image"""
image_shape0=[X.shape[0], self.num_channels, self.D, self.D]
ConX = X.reshape(image_shape0)
H0 = self.L1.conv(ConX, atype=atype)
H1 = self.L2.conv(H0, atype=atype)
H1 = H1.flatten(2)
H2 = activation_fn_th(T.dot(H1, self.W) + self.hbias, atype='tanh')
y = T.nnet.sigmoid(T.dot(H2, self.W_y))
return y
评论列表
文章目录