未验证 提交 06ffa78f 编写于 作者: S SunAhong1993 提交者: GitHub

Update InnerProduct.md

上级 10d513d3
## InnerProduct ## InnerProduct
### [InnerProduct](http://caffe.berkeleyvision.org/tutorial/layers/innerproduct.html) ### [InnerProduct](http://caffe.berkeleyvision.org/tutorial/layers/innerproduct.html)
``` ```
layer{ layer {
name: "fc" name: "fc"
type: "InnerProduct" type: "InnerProduct"
bottom: "data" bottom: "data"
top: "fc" top: "fc"
#卷积核的局部学习率和权值衰减因子 # 卷积核的局部学习率和权值衰减因子
param{ param {
lr_mult: 1 lr_mult: 1
decay_mult: 1 decay_mult: 1
} }
#偏置项的局部学习率和权值衰减因子 # 偏置项的局部学习率和权值衰减因子
param{ param {
lr_mult: 2 lr_mult: 2
decay_mult: 0 decay_mult: 0
} }
InnerProduct{ inner_product_param {
num_output: 20 #必填项 num_output: 20 # 必填项
bias_term: True bias_term: True
weight_filler { weight_filler {
type: "gaussian" type: "gaussian"
...@@ -50,7 +50,7 @@ paddle.fluid.layers.fc( ...@@ -50,7 +50,7 @@ paddle.fluid.layers.fc(
#### 参数初始化 #### 参数初始化
Caffe:Layer定义中共有两个结构体`param`用于设置局部学习率和权值衰减因子,其中第一个用于设置权重,第二个则用于设置偏值项;权重和偏置项的初始化参数在`InnerProduct`中进行设置;是否使用偏置项可以使用`bias_term`进行设置; Caffe:Layer定义中共有两个结构体`param`用于设置局部学习率和权值衰减因子,其中第一个用于设置权重,第二个则用于设置偏值项;权重和偏置项的初始化参数在`InnerProduct`中进行设置;是否使用偏置项可以使用`bias_term`进行设置;
PaddlePaddle:权重和偏置项的参数分别使用`param_attr``bias_attr`进行配置,配置参数如下所示,此外将`bias_attr`直接设为`False`表示不使用偏置项。 PaddlePaddle:权重和偏置项的参数分别使用`param_attr``bias_attr`进行配置,配置参数如下所示,此外将`bias_attr`直接设为`False`表示不使用偏置项。
``` ```python
paddle.fluid.ParamAttr( paddle.fluid.ParamAttr(
name=None, name=None,
initializer=None, initializer=None,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册