-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add lrn layer #9157
Add lrn layer #9157
Conversation
|
As a supplement, doc format standard is in |
python/paddle/fluid/layers/nn.py
Outdated
k(float): An offset (usually positive to avoid dividing by 0) | ||
alpha(float): The scaling parameter | ||
beta(float): The exponent | ||
name(str): A name for this operation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
功能介绍部分请简单介绍下LRN,给出参考文献及链接(如果有)。
参数介绍部分,遗漏了input,没有写明默认值,缺少必要的标点。
还存在其他问题。请参考 API注释撰写标准 撰写注释。同时注意语言上的问题。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Please add a test for your wrapper. |
doc/fluid/dev/src/fc.py
Outdated
**Local Response Normalization Operator** | ||
|
||
This operator comes from the paper: | ||
<<ImageNet Classification with Deep Convolutional Neural Networks>>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
参考文献 请移动至 参数介绍前,另去掉书名号,加上文献链接。
此处请添加 功能介绍。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.参考文献 请移动至 公式符号介绍后,参数介绍前。
2. 补充功能介绍
doc/fluid/dev/src/fc.py
Outdated
k(float, default 2.0): An offset (usually positive to avoid dividing by 0). | ||
alpha(float, default 1e-4): The scaling parameter. | ||
beta(float, default 0.75): The exponent. | ||
name(str, default None): A name for this operation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L105 不要使用 简写 如 dims
L105~L110 参数名和括号间请加一个空格。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
doc/fluid/dev/src/lrn.py
Outdated
|
||
data = fluid.layers.data(name="data", shape=[3, 112, 112], dtype="float32") | ||
lrn = fluid.layers.lrn(input=data) | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please delete this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @ranqiu92 please help to look again. Thanks!
python/paddle/fluid/layers/nn.py
Outdated
""" | ||
**Local Response Normalization Operator** | ||
|
||
Refer to `ImageNet Classification with Deep Convolutional Neural Networks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 请补充api的功能介绍。
- 参考文献 放置 参数介绍前 公式符号介绍后。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Args: | ||
input (Variable): The input tensor of this layer, and the dimension of input tensor must be 4. | ||
n (int, default 5): The number of channels to sum over. | ||
k (float, default 1.0): An offset (usually positive to avoid dividing by 0). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avoid being divided by 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@luotao1 注释的格式差不多了,你看下内容、表达上怎么样? |
@ranqiu92 内容上由 @qingqing01 把关即可。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@luotao1 Sure, I will review it ASAP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@luotao1 Most of the documentation is good. There is a small suggestion. Please fix that before merging. Thank you for the great PR!
python/paddle/fluid/layers/nn.py
Outdated
|
||
def lrn(input, n=5, k=1.0, alpha=1e-4, beta=0.75, name=None): | ||
""" | ||
Local Response Normalization Layer. This layer performs a kind of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kind -> type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Now the LRN is not exported to Python, I add a LRN layer in nn.py, please have a look.