-
Notifications
You must be signed in to change notification settings - Fork 88
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
【Hackathon No.152】PaddleRS API 文档完善 #115
Conversation
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.
感谢你为PaddleRS贡献文档。对于这个PR,我有如下意见和建议:
- 请不要在PR中包含
.idea
目录中的任何内容; - 『API文档』指的是文档(markdown、rst等格式),而不是doc string。这个PR中为每个API添加了额外的中文注释,这既不符合『撰写文档』的要求,也不符合Python语言规范(只有函数/类定义起始处的第一个string才是doc string)。
- 请注重翻译质量,修改如『罗德里戈·凯·达特等人。“用于变化检测的全卷积暹罗网络”』这样的『机翻』表述。另外,论文名称和作者的名字不需要翻译。
- 请在充分了解PaddleRS模型部署能力后再为PaddleRS增加『模型部署』教程。
“撰写中英文文档,对 PaddleRS 每个模型的构造参数进行详细说明”对于这个我有一些疑问,题目的意思是我需要新建两个文档来对每个模型的构造参数进行描述吗。如果是这样的话我的两个文档又该在哪里创建?有一些困惑,希望指点。 |
|
已在 #116 回复。另外,请签署CLA协议。 |
您好,已进行修改 |
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.
留了一些意见。
.idea/.gitignore
Outdated
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.
请不要在PR中包含.idea
目录。
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.
已删除PR中.idea目录
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
docs/intro/model_cons_param_cn.md
Outdated
@@ -0,0 +1,241 @@ | |||
#PaddleRS中每个模型的构造参数 | |||
|
|||
##BIT |
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.
类名、变量名用反引号包围。请参考https://github.com/PaddlePaddle/PaddleRS/blob/develop/docs/apis/train.md
请同步检查PR中的其它位置,并做修改。
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.
已修改,并修改PR中其他类似错误
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.
已修改,并修改PR中其他类似错误
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
docs/intro/model_cons_param_cn.md
Outdated
@@ -0,0 +1,241 @@ | |||
#PaddleRS中每个模型的构造参数 |
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.
名称不够书面。
另外请在撰写文档前阅读PaddleRS文档并了解PaddleRS相关概念。例如,PaddleRS的paddlers/tasks
中存放的(也是这篇文档中介绍如何构造的)数据集结构的官方中文称呼是『训练器』,而不是『模型』。参见:
https://github.com/PaddlePaddle/PaddleRS/blob/develop/docs/apis/train.md
此处为了避免用户混淆,我认为可以保留『模型构造参数』的说法,但需要额外说明一下,这篇文档中的『模型』指的实际是『训练器』而不是『网络实现』。
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.
已修改名称为“PaddleRS模型构造参数”,并对文档内容进行介绍
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
paddlers/transforms/operators.py
Outdated
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
growth (list[int]): Contains a list of the output channels of the convolutional layer in the Dense Block. | ||
HS_start_block (int): Which Dense Block starts with the initial bangs (Hard-Swish) activation function. | ||
SE_start_block (int): Which Dense Block to start with is the Squeeze-and-Excitation (SE) module. | ||
fc_channel (int): indicates the number of output channels of the full connection layer. |
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.
已修改
02421d6
to
3a4fffc
Compare
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.
请根据review意见继续修改~ 如果对review意见有疑问的话,可以直接在conversation中回复。
.gitignore
Outdated
@@ -26,6 +26,7 @@ share/python-wheels/ | |||
.installed.cfg | |||
*.egg | |||
MANIFEST | |||
.idea |
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.
这一个block全是安装相关的。建议把移到.idea
放在
# myvscode
.vscode
之后,并添加相应注释
# myidea
.idea
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
docs/intro/model_cons_param_cn.md
Outdated
##`CondenseNetV2` | ||
基于PaddlePaddle的CondenseNetV2实现。 | ||
|
||
该模型的原始文章见于Yang L, Jiang H, Cai R, et al. Condensenet v2: Sparse feature reactivation for deep networks[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2021: 3569-3578. (https://arxiv.org/abs/2104.04382) |
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.
参考文献格式与其它文章不同
docs/intro/model_cons_param_cn.md
Outdated
|------------------|-----------------------|------| | ||
|`in_channels (int)`| 输入图像的频带数 | | | ||
|`num_classes(int)`| 目标类别数 | | | ||
|`video_len (int,可选)`| 构造的伪视频的帧数 | `8` | |
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.
有的地方optional
被翻译为了可选
,有的地方没有。请统一风格。
docs/intro/model_cons_param_cn.md
Outdated
|
||
| 参数名 | 描述 | 默认值 | | ||
|------------------|-----|-------| | ||
|`in_channels (int)`|输入图像的频带数| | |
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
docs/intro/model_cons_param_cn.md
Outdated
|`backbone (str,可选)`| 骨干网,模型在' paddle.vision.models.resnet '中可用 | `resnet50` | | ||
|`backbone_pretrained (bool,可选)`|骨干网是否使用IMAGENET预训练权重| `True` | | ||
|`fpn_out_channels (int,可选)` | 特征金字塔网络输出的通道数量 | `256` | | ||
|`fsr_out_channels (int,可选)`| F-S关系模块输出的通道数 | `256` | |
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.
对于论文中提出的特殊模块名称,如果在不确定准确翻译的情况下,可以保留英文原名,或者在翻译的名字后面加括号注释英文原名。
本文档详细介绍了PaddleRS各个数据变化算子的构造参数,包括算子名称、算子用途、各个算子的参数名称、参数类型、参数意义以及参数默认值。 | ||
|
||
|
||
| 数据变换算子名 | 用途 | 任务 | ... | |
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
| `size_divisor (int)` | 填充后的图像宽度和高度将是' size_divisor '的倍数 | | | ||
|
||
##`RandomBlur | ||
对输入施加随机模糊 |
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
针对提出的建议已全部进行修改,请review一下 |
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.
还是有一些基础问题,请修改~
.gitignore
Outdated
@@ -129,6 +130,9 @@ dmypy.json | |||
# myvscode | |||
.vscode | |||
|
|||
#myidea |
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
.gitignore
Outdated
@@ -27,6 +27,7 @@ share/python-wheels/ | |||
*.egg | |||
MANIFEST | |||
|
|||
|
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.
已修改
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
docs/intro/model_cons_param_cn.md
Outdated
@@ -0,0 +1,528 @@ | |||
#PaddleRS模型构造参数 | |||
本文档详细介绍了PaddleRS各个模型训练器的构造参数,包括其参数名,参数类型,参数描述及默认值。 |
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.
已修改
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
tutorials/train/README.md
Outdated
2. python部署(以BIT为例) | ||
|
||
使用预测接口的基本流程为:首先构建Predictor对象,然后调用Predictor的predict()方法执行预测。需要说明的是,Predictor对象的predict()方法返回的结果与对应的训练器(在paddlers/tasks/目录的文件中定义)的predict()方法返回结果具有相同的格式。 | ||
```shell |
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.
语言名称错误,应该是python
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
tutorials/train/README.md
Outdated
|
||
2. python部署(以BIT为例) | ||
|
||
使用预测接口的基本流程为:首先构建Predictor对象,然后调用Predictor的predict()方法执行预测。需要说明的是,Predictor对象的predict()方法返回的结果与对应的训练器(在paddlers/tasks/目录的文件中定义)的predict()方法返回结果具有相同的格式。 |
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.
Predictor
、predict()
、paddlers/tasks/
等均未添加反引号。请同步检查PR中其它部分。
paddlers/transforms/operators.py
Outdated
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.
为什么删除此模块?这将导致PaddleRS不可用。
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.
这里的修改应该pre-commit进行的格式修改,我看修改都是删除行末的空格。辛苦您了
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.
之前误删了,已经重新push了,修改的地方都是删除原来行末的空格。
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
113217c
to
f019321
Compare
已完成修改~ |
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.
留了一些意见
docs/intro/model_cons_param_cn.md
Outdated
| 参数名 | 描述 | 默认值 | | ||
|----------------------------|----------------------------------------------------------------------------------------|-------| | ||
| `losses (list)` | 损失函数列表 | `None` | | ||
| `sr_factor (int) ` | 超分辨率的缩放因子,原始图像的大小将乘以此因子。例如,如果原始图像为 `H` x `W`,则输出图像将为 `sr_factor * H` x `sr_factor * W` | `4` | |
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.
sr_factor (int)
第二个反引号前有3个多余的空格。
@@ -0,0 +1,254 @@ | |||
# PaddleRS Data Transform Operator Construct Parameter |
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.
PaddleRS Data Transform Operator Construct Parameter
-> PaddleRS Data Transformation Operator Construction Parameters
@@ -0,0 +1,254 @@ | |||
# PaddleRS Data Transform Operator Construct Parameter | |||
|
|||
This document describes the parameters of each PaddleRS data transform operator in detail, including the operator name, operator purpose, parameter name, parameter type, parameter meaning, and parameter Default Value value of each operator. |
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.
transform operator
->transformation operator
。Default Value
需要首字母小写,请不要在句中随意进行首字母大写。
docs/quick_start.md
Outdated
|
||
导出模型可见:[模型导出](./deploy/export/README.md) | ||
|
||
### 2. python部署 |
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.
python的规范写法为Python
docs/quick_start.md
Outdated
|
||
## 模型部署 | ||
|
||
### 1. 导出模型 |
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.
『导出模型』->『模型导出』
docs/quick_start.md
Outdated
|
||
### 2. python部署 | ||
|
||
python部署可见:[Python部署](./deploy/README.md) |
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.
Python部署可参考:
docs/quick_start.md
Outdated
@@ -0,0 +1,147 @@ | |||
# 快速开始 | |||
|
|||
本目录中整理了使用PaddleRS训练模型的示例代码。代码中均提供对示例数据的自动下载,并均使用GPU对模型进行训练。 |
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.
本目录中整理了使用PaddleRS训练模型的示例代码。
『本目录』是docs
,其中并没有『整理了使用PaddleRS训练模型的示例代码』。这样的说法让读者感到疑惑。
此外,不建议大段拷贝其它文档中的内容,因为这会导致文件内容冗余,从而使项目可维护性降低(后续如果有一处文档需要改动,就不得不同步修改两个地方)。
请去除此部分。
docs/quick_start.md
Outdated
|
||
## 模型部署 | ||
|
||
### 1. 导出模型 |
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. 标题
风格编号,二级标题使用1.1 子标题
风格编号。
docs/quick_start.md
Outdated
## 模型训练 | ||
|
||
+ 在安装完成PaddleRS后,即可开始模型训练。 | ||
+ 模型训练可参考:[使用教程——训练模型](./tutorials/train/README.md) |
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.
当前目录为docs
,其中并没有./tutorials
子目录,因此该链接应该是无效的。
请同步检查PR中涉及到的所有链接,修改无效的链接。
已针对您提出的建议进行修改~ |
@@ -1,6 +1,6 @@ | |||
# PaddleRS Data Transform Operator Construct Parameter | |||
# PaddleRS Data Transformation Operator Construct Parameters |
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.
Construct
->Construction
已完成修改 |
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.
我们将在CI通过后合入此PR。 再次感谢你为PaddleRS贡献文档,以及对PR review工作的配合。 |
不容易啊!顺利合入了!为ggggkkkknnnn的耐心和坚持点个赞!也为我们负责review的研发同学的认真和负责点赞!!! |
@ggggkkkknnnn 开发者你好,第四期飞桨黑客松已全部结束,进入荣誉&奖金发放阶段,有一些信息需要与你收集与确认,请尽快添加工作人员的微信,备注黑客松+队名,他会拉你进群,感谢配合~ |
@ggggkkkknnnn 开发者您好,请尽快添加我们的工作人员微信,如果在6.20之前无法确认您的信息,我们将不再进行奖金发放,本任务算作自发贡献。 |
PR types
Others
PR changes
Docs
Description
撰写中英文文档,对 PaddleRS 每个模型的构造参数进行详细说明
撰写中英文文档,对 PaddleRS 每个数据预处理/数据变换算子的构造参数进行详细说明
完善 PaddleRS quick start 中英文文档,在已有的『模型训练』部分内容基础上,添加『模型精度验证』与『模型部署』部分内容。