def _linear_layer(self, input, input_size, output_size, scope_name):
with tf.variable_scope(scope_name) as scope:
weights = tf.Variable(name='weights',
initial_value=tf.truncated_normal(shape=[input_size, output_size], stddev=0.1))
biases = tf.Variable(name='biases', initial_value=tf.constant(value=0.1, shape=[output_size]))
output = tf.matmul(input, weights) + biases
return output
评论列表
文章目录