dense全连接层,相当于添加一个层
tf.layers.dense(
inputs, # 输入此网络的数据
units, # 输出维度大小,改变inputs的最后一维
activation=None, # 激活函数
use_bias=True, #是否使用偏置项
kernel_initializer=None, # 权重初始化if True initializer used by `tf.get_variable`.
bias_initializer=init_ops.zeros_initializer(), # 偏差初始化
kernel_regularizer=None, # 权重正则化
bias_regularizer=None, # 偏差正则化
activity_regularizer=None, # 输出的正则化
kernel_constraint=None, #
bias_constraint=None,
trainable=True, # 该层是否参与训练if `True` also add variables to the graph collection ‘GraphKeys.TRAINABLE_VARIABLES` (see `tf.Variable`).
name=None, # 该层的名字
reuse=None) # 是否重复使用参数
# outputs = activation(inputs * kernel + bias)
# `kernel` is a weights matrix created by the layer
# `bias` is a bias vector created by the layer (only if `use_bias` is `True`).