Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
a2821a01
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
a2821a01
编写于
9月 22, 2022
作者:
N
Nyakku Shigure
提交者:
GitHub
9月 22, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CodeStyle] remove tabs in python fluid unittests (#46357)
上级
3448afc1
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
11 addition
and
11 deletion
+11
-11
python/paddle/fluid/tests/unittests/test_eye_op.py
python/paddle/fluid/tests/unittests/test_eye_op.py
+2
-2
python/paddle/fluid/tests/unittests/test_generate_proposal_labels_op.py
...fluid/tests/unittests/test_generate_proposal_labels_op.py
+4
-4
python/paddle/fluid/tests/unittests/test_generate_proposals_op.py
...addle/fluid/tests/unittests/test_generate_proposals_op.py
+1
-1
python/paddle/fluid/tests/unittests/test_optimizer.py
python/paddle/fluid/tests/unittests/test_optimizer.py
+2
-2
python/paddle/fluid/tests/unittests/test_recurrent_op.py
python/paddle/fluid/tests/unittests/test_recurrent_op.py
+1
-1
python/paddle/fluid/tests/unittests/xpu/test_generate_proposals_v2_op_xpu.py
.../tests/unittests/xpu/test_generate_proposals_v2_op_xpu.py
+1
-1
未找到文件。
python/paddle/fluid/tests/unittests/test_eye_op.py
浏览文件 @
a2821a01
...
...
@@ -31,7 +31,7 @@ class TestEyeOp(OpTest):
def
setUp
(
self
):
'''
Test eye op with specified shape
Test eye op with specified shape
'''
self
.
python_api
=
paddle
.
eye
self
.
op_type
=
"eye"
...
...
@@ -52,7 +52,7 @@ class TestEyeOp1(OpTest):
def
setUp
(
self
):
'''
Test eye op with default parameters
Test eye op with default parameters
'''
self
.
python_api
=
paddle
.
eye
self
.
op_type
=
"eye"
...
...
python/paddle/fluid/tests/unittests/test_generate_proposal_labels_op.py
浏览文件 @
a2821a01
...
...
@@ -231,10 +231,10 @@ def _box_to_delta(ex_boxes, gt_boxes, weights):
def
_expand_bbox_targets
(
bbox_targets_input
,
class_nums
,
is_cls_agnostic
):
class_labels
=
bbox_targets_input
[:,
0
]
fg_inds
=
np
.
where
(
class_labels
>
0
)[
0
]
#if is_cls_agnostic:
#
class_labels = [1 if ll > 0 else 0 for ll in class_labels]
# class_labels = np.array(class_labels, dtype=np.int32)
#
class_nums = 2
#
if is_cls_agnostic:
#
class_labels = [1 if ll > 0 else 0 for ll in class_labels]
#
class_labels = np.array(class_labels, dtype=np.int32)
#
class_nums = 2
bbox_targets
=
np
.
zeros
((
class_labels
.
shape
[
0
],
4
*
class_nums
if
not
is_cls_agnostic
else
4
*
2
))
bbox_inside_weights
=
np
.
zeros
(
bbox_targets
.
shape
)
...
...
python/paddle/fluid/tests/unittests/test_generate_proposals_op.py
浏览文件 @
a2821a01
...
...
@@ -213,7 +213,7 @@ def filter_boxes(boxes, min_size, im_info, pixel_offset=True):
def
iou
(
box_a
,
box_b
,
pixel_offset
=
True
):
"""
Apply intersection-over-union overlap between box_a and box_b
Apply intersection-over-union overlap between box_a and box_b
"""
xmin_a
=
min
(
box_a
[
0
],
box_a
[
2
])
ymin_a
=
min
(
box_a
[
1
],
box_a
[
3
])
...
...
python/paddle/fluid/tests/unittests/test_optimizer.py
浏览文件 @
a2821a01
...
...
@@ -1041,8 +1041,8 @@ class TestRecomputeOptimizer(unittest.TestCase):
def
test_dropout_with_seed
(
self
):
"""
when we recompute a dropout op, make sure that the recomputed one
is the same as the original var.
"""
is the same as the original var.
"""
def
gen_data
():
return
{
...
...
python/paddle/fluid/tests/unittests/test_recurrent_op.py
浏览文件 @
a2821a01
...
...
@@ -619,7 +619,7 @@ class RecurrentOpStopGradientTest(RecurrentOpTest1):
h_t = \sigma (W x_t + U h_{t-1})
weights:
- W
- U
- U
vars:
- x
memories:
...
...
python/paddle/fluid/tests/unittests/xpu/test_generate_proposals_v2_op_xpu.py
浏览文件 @
a2821a01
...
...
@@ -132,7 +132,7 @@ def filter_boxes(boxes, min_size, im_shape, pixel_offset=True):
def
iou
(
box_a
,
box_b
,
pixel_offset
=
True
):
"""
Apply intersection-over-union overlap between box_a and box_b
Apply intersection-over-union overlap between box_a and box_b
"""
xmin_a
=
min
(
box_a
[
0
],
box_a
[
2
])
ymin_a
=
min
(
box_a
[
1
],
box_a
[
3
])
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录