Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
4c55502b
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看板
提交
4c55502b
编写于
7月 30, 2021
作者:
L
lelelelelez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix function-redefined
上级
6c09496a
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
12 addition
and
40 deletion
+12
-40
python/paddle/fluid/dataloader/dataloader_iter.py
python/paddle/fluid/dataloader/dataloader_iter.py
+0
-10
python/paddle/fluid/tests/unittests/dygraph_to_static/test_dict.py
...ddle/fluid/tests/unittests/dygraph_to_static/test_dict.py
+1
-1
python/paddle/fluid/tests/unittests/mkldnn/test_activation_mkldnn_op.py
...fluid/tests/unittests/mkldnn/test_activation_mkldnn_op.py
+0
-3
python/paddle/fluid/tests/unittests/mkldnn/test_pool2d_mkldnn_op.py
...dle/fluid/tests/unittests/mkldnn/test_pool2d_mkldnn_op.py
+0
-3
python/paddle/fluid/tests/unittests/sequence/test_sequence_unpad_op.py
.../fluid/tests/unittests/sequence/test_sequence_unpad_op.py
+1
-1
python/paddle/fluid/tests/unittests/test_argsort_op.py
python/paddle/fluid/tests/unittests/test_argsort_op.py
+1
-1
python/paddle/fluid/tests/unittests/test_bicubic_interp_v2_op.py
...paddle/fluid/tests/unittests/test_bicubic_interp_v2_op.py
+2
-2
python/paddle/fluid/tests/unittests/test_flatten2_op.py
python/paddle/fluid/tests/unittests/test_flatten2_op.py
+1
-1
python/paddle/fluid/tests/unittests/test_flatten_op.py
python/paddle/fluid/tests/unittests/test_flatten_op.py
+1
-1
python/paddle/fluid/tests/unittests/test_fleet_graph_execution_meta_optimizer.py
...ts/unittests/test_fleet_graph_execution_meta_optimizer.py
+1
-1
python/paddle/fluid/tests/unittests/test_fleet_sharding_meta_optimizer.py
...uid/tests/unittests/test_fleet_sharding_meta_optimizer.py
+1
-1
python/paddle/fluid/tests/unittests/test_imperative_auto_prune.py
...addle/fluid/tests/unittests/test_imperative_auto_prune.py
+0
-12
python/paddle/fluid/tests/unittests/test_linspace.py
python/paddle/fluid/tests/unittests/test_linspace.py
+2
-2
python/paddle/fluid/tests/unittests/test_parallel_dygraph_pipeline_parallel.py
...ests/unittests/test_parallel_dygraph_pipeline_parallel.py
+1
-1
未找到文件。
python/paddle/fluid/dataloader/dataloader_iter.py
浏览文件 @
4c55502b
...
...
@@ -391,16 +391,6 @@ class _DataLoaderIterMultiProcess(_DataLoaderIterBase):
for
_
in
range
(
self
.
_outstanding_capacity
):
self
.
_try_put_indices
()
def
_clear_and_remove_data_queue
(
self
):
if
self
.
_data_queue
is
not
None
:
while
True
:
try
:
self
.
_data_queue
.
get_nowait
()
except
:
self
.
_data_queue
.
cancel_join_thread
()
self
.
_data_queue
.
close
()
break
def
_shutdown_worker
(
self
,
worker_id
,
shutdown
=
False
):
if
self
.
_worker_status
[
worker_id
]
or
(
self
.
_persistent_workers
and
shutdown
):
...
...
python/paddle/fluid/tests/unittests/dygraph_to_static/test_dict.py
浏览文件 @
4c55502b
...
...
@@ -219,7 +219,7 @@ class NetWithDictPop(paddle.nn.Layer):
return
x
class
TestDictPop
(
TestNetWithDict
):
class
TestDictPop
3
(
TestNetWithDict
):
def
setUp
(
self
):
self
.
x
=
np
.
array
([
2
,
2
]).
astype
(
'float32'
)
...
...
python/paddle/fluid/tests/unittests/mkldnn/test_activation_mkldnn_op.py
浏览文件 @
4c55502b
...
...
@@ -117,9 +117,6 @@ class TestMKLDNNSwishDim2(TestSwish):
def
init_dtype
(
self
):
self
.
dtype
=
np
.
float32
def
init_dtype
(
self
):
self
.
dtype
=
np
.
float32
class
TestMKLDNNHardSwishDim2
(
TestHardSwish
):
def
setUp
(
self
):
...
...
python/paddle/fluid/tests/unittests/mkldnn/test_pool2d_mkldnn_op.py
浏览文件 @
4c55502b
...
...
@@ -122,9 +122,6 @@ class TestAsymPad(TestPool2D_Op):
def
init_kernel_type
(
self
):
self
.
use_mkldnn
=
True
def
init_global_pool
(
self
):
self
.
global_pool
=
False
def
init_data_type
(
self
):
self
.
dtype
=
np
.
float32
...
...
python/paddle/fluid/tests/unittests/sequence/test_sequence_unpad_op.py
浏览文件 @
4c55502b
...
...
@@ -79,7 +79,7 @@ class TestSequenceUnpadOp4(TestSequenceUnpadOp):
self
.
dtype
=
"float64"
class
TestSequenceUnpadOp
4
(
TestSequenceUnpadOp
):
class
TestSequenceUnpadOp
5
(
TestSequenceUnpadOp
):
def
init
(
self
):
self
.
length
=
[
0
,
4
,
3
,
0
]
self
.
x_shape
=
(
4
,
5
,
3
,
3
,
6
)
...
...
python/paddle/fluid/tests/unittests/test_argsort_op.py
浏览文件 @
4c55502b
...
...
@@ -436,7 +436,7 @@ class TestArgsortImperative3(TestArgsortImperative):
self
.
axis
=
1
class
TestArgsortImperative
2
(
TestArgsortImperative
):
class
TestArgsortImperative
4
(
TestArgsortImperative
):
def
init
(
self
):
self
.
input_shape
=
[
2
,
3
,
4
]
self
.
axis
=
1
...
...
python/paddle/fluid/tests/unittests/test_bicubic_interp_v2_op.py
浏览文件 @
4c55502b
...
...
@@ -484,7 +484,7 @@ class TestBicubicOpError(unittest.TestCase):
align_corners
=
False
,
scale_factor
=
[
1
,
2
,
2
])
def
test_scale_value
():
def
test_scale_value
_1
():
x
=
fluid
.
data
(
name
=
"x"
,
shape
=
[
2
,
3
,
6
,
6
],
dtype
=
"float32"
)
out
=
interpolate
(
x
,
...
...
@@ -535,7 +535,7 @@ class TestBicubicOpError(unittest.TestCase):
self
.
assertRaises
(
ValueError
,
test_outshape_and_scale
)
self
.
assertRaises
(
ValueError
,
test_align_corners_and_nearest
)
self
.
assertRaises
(
ValueError
,
test_scale_shape
)
self
.
assertRaises
(
ValueError
,
test_scale_value
)
self
.
assertRaises
(
ValueError
,
test_scale_value
_1
)
self
.
assertRaises
(
ValueError
,
test_size_and_scale
)
self
.
assertRaises
(
ValueError
,
test_size_and_scale2
)
self
.
assertRaises
(
TypeError
,
test_size_type
)
...
...
python/paddle/fluid/tests/unittests/test_flatten2_op.py
浏览文件 @
4c55502b
...
...
@@ -46,7 +46,7 @@ class TestFlattenOp(OpTest):
self
.
attrs
=
{
"axis"
:
self
.
axis
}
class
TestFlattenOp
(
TestFlattenOp
):
class
TestFlattenOp
1
(
TestFlattenOp
):
def
init_test_case
(
self
):
self
.
in_shape
=
(
3
,
2
,
5
,
4
)
self
.
axis
=
0
...
...
python/paddle/fluid/tests/unittests/test_flatten_op.py
浏览文件 @
4c55502b
...
...
@@ -43,7 +43,7 @@ class TestFlattenOp(OpTest):
self
.
attrs
=
{
"axis"
:
self
.
axis
}
class
TestFlattenOp
(
TestFlattenOp
):
class
TestFlattenOp
1
(
TestFlattenOp
):
def
init_test_case
(
self
):
self
.
in_shape
=
(
3
,
2
,
2
,
10
)
self
.
axis
=
0
...
...
python/paddle/fluid/tests/unittests/test_fleet_graph_execution_meta_optimizer.py
浏览文件 @
4c55502b
...
...
@@ -209,7 +209,7 @@ class TestFleetGraphExecutionMetaOptimizer(unittest.TestCase):
proc_b
.
start
()
wait
([
proc_a
,
proc_b
])
def
test_graph_execution_optimizer
(
self
):
def
test_graph_execution_optimizer
_v2
(
self
):
port_a
=
self
.
_dist_ut_port_0
+
6
port_b
=
self
.
_dist_ut_port_1
+
6
node_a
=
{
...
...
python/paddle/fluid/tests/unittests/test_fleet_sharding_meta_optimizer.py
浏览文件 @
4c55502b
...
...
@@ -292,7 +292,7 @@ class TestFleetShardingMetaOptimizer(TestFleetMetaOptimizer):
])
class
TestFleetMetaOptimizer
(
TestFleetMetaOptimizer
):
class
TestFleetMetaOptimizer
_V1
(
TestFleetMetaOptimizer
):
def
setUp
(
self
):
os
.
environ
[
"PADDLE_TRAINER_ID"
]
=
"3"
os
.
environ
[
...
...
python/paddle/fluid/tests/unittests/test_imperative_auto_prune.py
浏览文件 @
4c55502b
...
...
@@ -375,18 +375,6 @@ class TestImperativeAutoPrune(unittest.TestCase):
self
.
assertTrue
(
case3
.
linear2
.
weight
.
_grad_ivar
()
is
None
)
self
.
assertTrue
(
case3
.
linear
.
weight
.
_grad_ivar
()
is
not
None
)
def
test_case2_prune_no_grad_branch
(
self
):
with
fluid
.
dygraph
.
guard
():
value1
=
np
.
arange
(
784
).
reshape
(
1
,
784
)
value2
=
np
.
arange
(
1
).
reshape
(
1
,
1
)
v1
=
fluid
.
dygraph
.
to_variable
(
value1
).
astype
(
"float32"
)
v2
=
fluid
.
dygraph
.
to_variable
(
value2
).
astype
(
"float32"
)
case3
=
AutoPruneLayer2
(
input_size
=
784
)
loss
=
case3
(
v1
,
v2
)
loss
.
backward
()
self
.
assertTrue
(
case3
.
linear2
.
weight
.
_grad_ivar
()
is
None
)
self
.
assertTrue
(
case3
.
linear
.
weight
.
_grad_ivar
()
is
not
None
)
def
test_case3_prune_no_grad_branch2
(
self
):
with
fluid
.
dygraph
.
guard
():
value1
=
np
.
arange
(
1
).
reshape
(
1
,
1
)
...
...
python/paddle/fluid/tests/unittests/test_linspace.py
浏览文件 @
4c55502b
...
...
@@ -143,10 +143,10 @@ class TestLinspaceOpError(unittest.TestCase):
self
.
assertRaises
(
TypeError
,
test_start_type
)
def
test_end_
d
type
():
def
test_end_type
():
fluid
.
layers
.
linspace
(
0
,
[
10
],
1
,
dtype
=
"float32"
)
self
.
assertRaises
(
TypeError
,
test_end_
d
type
)
self
.
assertRaises
(
TypeError
,
test_end_type
)
def
test_step_dtype
():
fluid
.
layers
.
linspace
(
0
,
10
,
[
0
],
dtype
=
"float32"
)
...
...
python/paddle/fluid/tests/unittests/test_parallel_dygraph_pipeline_parallel.py
浏览文件 @
4c55502b
...
...
@@ -27,7 +27,7 @@ class TestHybridPipeParallel(TestMultipleGpus):
def
test_hybrid_parallel_pp_tuple_inputs
(
self
):
self
.
run_mnist_2gpu
(
'hybrid_parallel_pp_embedding.py'
)
def
test_hybrid_parallel_
pp_tuple_inputs
(
self
):
def
test_hybrid_parallel_
shared_weight
(
self
):
self
.
run_mnist_2gpu
(
'hybrid_parallel_shared_weight.py'
)
def
test_pipeline_parallel
(
self
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录