def __init__(self, input, n_in, n_out):
self.W = tf.Variable(tf.zeros(shape=(n_in, n_out)), name="LR_W")
self.b = tf.Variable(tf.zeros(shape=(n_out,)), name="LR_b")
self.linear = tf.add(tf.matmul(input, self.W), self.b)
self.p_y_given_x = tf.nn.softmax(tf.add(tf.matmul(input, self.W), self.b))
self.y_pred = tf.arg_max(self.p_y_given_x, 1)
评论列表
文章目录