Tensorflow layers.fully_connected 参数(自用)
原创淇迹 最后发布于2018-07-06 15:32:18 阅读数 7094 收藏
展开
def fully_connected(inputs,
num_outputs,
activation_fn=nn.relu,
normalizer_fn=None,
normalizer_params=None,
weights_initializer=initializers.xavier_initializer(),
weights_regularizer=None,
biases_initializer=init_ops.zeros_initializer(),
biases_regularizer=None,
reuse=None,
variables_collections=None,
outputs_collections=None,
trainable=True,
scope=None):
inputs: A tensor of at least rank 2 and static value for the last dimension; i.e. [batch_size, depth]
, [None, None, None, channels]
.
至少有两层张量且最后一维是静态值。例如[batch_size,depth],[None, None, None, channels].
num_outputs: Integer or long, the number of output units in the layer.
int型整数或者是long型,是层中输出单元的个数
activation_fn: Activation function. The default value is a ReLU function.Explicitly set it to None to skip it and maintain a linear activation.
激活函数,默认值是ReLU函数,如果将它设为None则会跳过且保持线性激活
normalizer_fn: Normalization function to use instead of biases
. If normalizer_fn
is provided then biases_initializer
and
biases_regularizer
are ignored and biases
are not created nor added.default set to None for no normalizer function
正则化函数用来代替偏置,如果设置了正则化函数,则biases_initializer和biases_regularizer将被忽略且biases不会被创建。
默认设置None,不设置正则化函数
normalizer_params: Normalization function parameters.
正则化函数参数
weights_initializer: An initializer for the weights.
————————————————
版权声明:本文为CSDN博主「淇迹」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_36235192/article/details/80940357