def encode_y(self, x, weights, biases):
c1 = tf.nn.relu(batch_normal(conv2d(x, weights['e1'], biases['eb1']), scope='eny_bn1'))
c2 = tf.nn.relu(batch_normal(conv2d(c1, weights['e2'], biases['eb2']), scope='eny_bn2'))
c2 = tf.reshape(c2, [self.batch_size, 128 * 7 * 7])
result_y = tf.nn.sigmoid(fully_connect(c2, weights['e3'], biases['eb3']))
#y_vec = tf.one_hot(tf.arg_max(result_y, 1), 10)
return result_y
评论列表
文章目录