提交 061307e2 编写于 作者: T tink2123

fix diff from en and cn

上级 e45433df
...@@ -62,9 +62,9 @@ multiclass_nms ...@@ -62,9 +62,9 @@ multiclass_nms
.. code-block:: python .. code-block:: python
import paddle.fluid as fluid import paddle.fluid as fluid
boxes = fluid.layers.data(name='bboxes', shape=[81, 4], boxes = fluid.data(name='bboxes', shape=[None, 81, 4],
dtype='float32', lod_level=1) dtype='float32', lod_level=1)
scores = fluid.layers.data(name='scores', shape=[81], scores = fluid.data(name='scores', shape=[None, 81],
dtype='float32', lod_level=1) dtype='float32', lod_level=1)
out = fluid.layers.multiclass_nms(bboxes=boxes, out = fluid.layers.multiclass_nms(bboxes=boxes,
scores=scores, scores=scores,
......
...@@ -37,12 +37,10 @@ noam衰减的numpy实现如下: ...@@ -37,12 +37,10 @@ noam衰减的numpy实现如下:
.. code-block:: python .. code-block:: python
import paddle.fluid as fluid import paddle.fluid as fluid
d_model = 0.01
warmup_steps = 100 warmup_steps = 100
learning_rate = 0.01 learning_rate = 0.01
lr = fluid.layers.learning_rate_scheduler.noam_decay( lr = fluid.layers.noam_decay(d_model, warmup_steps, learning_rate)
1/(warmup_steps *(learning_rate ** 2)),
warmup_steps)
......
...@@ -57,8 +57,8 @@ yolo_box ...@@ -57,8 +57,8 @@ yolo_box
.. code-block:: python .. code-block:: python
import paddle.fluid as fluid import paddle.fluid as fluid
x = fluid.layers.data(name='x', shape=[255, 13, 13], dtype='float32') x = fluid.data(name='x', shape=[None, 255, 13, 13], dtype='float32')
img_size = fluid.layers.data(name='img_size',shape=[2],dtype='int64') img_size = fluid.data(name='img_size',shape=[None, 2],dtype='int64')
anchors = [10, 13, 16, 30, 33, 23] anchors = [10, 13, 16, 30, 33, 23]
boxes, scores = fluid.layers.yolo_box(x=x, img_size=img_size, class_num=80, anchors=anchors, boxes, scores = fluid.layers.yolo_box(x=x, img_size=img_size, class_num=80, anchors=anchors,
conf_thresh=0.01, downsample_ratio=32) conf_thresh=0.01, downsample_ratio=32)
......
...@@ -85,10 +85,10 @@ yolov3 loss前的网络输出形状为[N,C,H,W],H和W应该相同,用 ...@@ -85,10 +85,10 @@ yolov3 loss前的网络输出形状为[N,C,H,W],H和W应该相同,用
.. code-block:: python .. code-block:: python
import paddle.fluid as fluid import paddle.fluid as fluid
x = fluid.layers.data(name='x', shape=[255, 13, 13], dtype='float32') x = fluid.data(name='x', shape=[None, 255, 13, 13], dtype='float32')
gt_box = fluid.layers.data(name='gt_box', shape=[6, 4], dtype='float32') gt_box = fluid.data(name='gt_box', shape=[None, 6, 4], dtype='float32')
gt_label = fluid.layers.data(name='gt_label', shape=[6], dtype='int32') gt_label = fluid.data(name='gt_label', shape=[None, 6], dtype='int32')
gt_score = fluid.layers.data(name='gt_score', shape=[6], dtype='float32') gt_score = fluid.data(name='gt_score', shape=[None, 6], dtype='float32')
anchors = [10, 13, 16, 30, 33, 23, 30, 61, 62, 45, 59, 119, 116, 90, 156, 198, 373, 326] anchors = [10, 13, 16, 30, 33, 23, 30, 61, 62, 45, 59, 119, 116, 90, 156, 198, 373, 326]
anchor_mask = [0, 1, 2] anchor_mask = [0, 1, 2]
loss = fluid.layers.yolov3_loss(x=x, gt_box=gt_box, gt_label=gt_label, loss = fluid.layers.yolov3_loss(x=x, gt_box=gt_box, gt_label=gt_label,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册