tf.layers.dense
tf.layers.dense(
inputs,
units,
activation=None,
use_bias=True,
kernel_initializer=None,
bias_initializer=tf.zeros_initializer(),
kernel_regularizer=None,
bias_regularizer=None,
activity_regularizer=None,
kernel_constraint=None,
bias_constraint=None,
trainable=True,
name=None,
reuse=None
)
Functional interface for the densely-connected layer紧密连接层的功能接口
inputs:此层的输入
units:此层的输出维度
activation=None, 激活函数
use_bias=True,偏置
with slim.arg_scope([slim.conv2d, slim.max_pool2d, slim.avg_pool2d],
stride=1, padding='SAME'):
表示slim.conv2d, slim.max_pool2d, slim.avg_pool2d函数的stride=1, padding='SAME'为默认值,这样减少代码的抒写
|
|