Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
a30b8c3f
P
PaddleDetection
项目概览
s920243400
/
PaddleDetection
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleDetection
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
a30b8c3f
编写于
10月 22, 2020
作者:
L
Leo Chen
提交者:
GitHub
10月 22, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add enable_static() for model with static graph (#1498)
* add enable_static() * follow comments * remove blank line
上级
7fd1f891
变更
25
隐藏空白更改
内联
并排
Showing
25 changed file
with
49 addition
and
0 deletion
+49
-0
deploy/python/infer.py
deploy/python/infer.py
+2
-0
ppdet/data/tests/test_dataset.py
ppdet/data/tests/test_dataset.py
+2
-0
ppdet/data/tests/test_loader.py
ppdet/data/tests/test_loader.py
+2
-0
ppdet/data/tests/test_loader_yaml.py
ppdet/data/tests/test_loader_yaml.py
+2
-0
ppdet/ext_op/test/test_corner_pool.py
ppdet/ext_op/test/test_corner_pool.py
+2
-0
ppdet/modeling/tests/test_architectures.py
ppdet/modeling/tests/test_architectures.py
+1
-0
slim/distillation/distill.py
slim/distillation/distill.py
+2
-0
slim/extensions/distill_pruned_model/distill_pruned_model.py
slim/extensions/distill_pruned_model/distill_pruned_model.py
+2
-0
slim/nas/train_nas.py
slim/nas/train_nas.py
+2
-0
slim/prune/eval.py
slim/prune/eval.py
+2
-0
slim/prune/export_model.py
slim/prune/export_model.py
+2
-0
slim/prune/infer.py
slim/prune/infer.py
+2
-0
slim/prune/prune.py
slim/prune/prune.py
+2
-0
slim/quantization/eval.py
slim/quantization/eval.py
+2
-0
slim/quantization/export_model.py
slim/quantization/export_model.py
+2
-0
slim/quantization/infer.py
slim/quantization/infer.py
+2
-0
slim/quantization/train.py
slim/quantization/train.py
+2
-0
slim/sensitive/sensitive.py
slim/sensitive/sensitive.py
+2
-0
tools/eval.py
tools/eval.py
+2
-0
tools/export_model.py
tools/export_model.py
+2
-0
tools/export_serving_model.py
tools/export_serving_model.py
+2
-0
tools/face_eval.py
tools/face_eval.py
+2
-0
tools/infer.py
tools/infer.py
+2
-0
tools/train.py
tools/train.py
+2
-0
tools/train_multi_machine.py
tools/train_multi_machine.py
+2
-0
未找到文件。
deploy/python/infer.py
浏览文件 @
a30b8c3f
...
...
@@ -22,6 +22,7 @@ from functools import reduce
from
PIL
import
Image
import
cv2
import
numpy
as
np
import
paddle
import
paddle.fluid
as
fluid
from
preprocess
import
preprocess
,
Resize
,
Normalize
,
Permute
,
PadStride
from
visualize
import
visualize_box_mask
...
...
@@ -509,6 +510,7 @@ def main():
if
__name__
==
'__main__'
:
paddle
.
enable_static
()
parser
=
argparse
.
ArgumentParser
(
description
=
__doc__
)
parser
.
add_argument
(
"--model_dir"
,
...
...
ppdet/data/tests/test_dataset.py
浏览文件 @
a30b8c3f
...
...
@@ -146,5 +146,7 @@ class TestDataset(unittest.TestCase):
if
__name__
==
'__main__'
:
import
paddle
paddle
.
enable_static
()
logging
.
basicConfig
()
unittest
.
main
()
ppdet/data/tests/test_loader.py
浏览文件 @
a30b8c3f
...
...
@@ -168,4 +168,6 @@ class TestReader(unittest.TestCase):
if
__name__
==
'__main__'
:
import
paddle
paddle
.
enable_static
()
unittest
.
main
()
ppdet/data/tests/test_loader_yaml.py
浏览文件 @
a30b8c3f
...
...
@@ -112,4 +112,6 @@ class TestReaderYAML(unittest.TestCase):
if
__name__
==
'__main__'
:
import
paddle
paddle
.
enable_static
()
unittest
.
main
()
ppdet/ext_op/test/test_corner_pool.py
浏览文件 @
a30b8c3f
...
...
@@ -120,4 +120,6 @@ class TestLeftPoolOp(TestRightPoolOp):
if
__name__
==
"__main__"
:
import
paddle
paddle
.
enable_static
()
unittest
.
main
()
ppdet/modeling/tests/test_architectures.py
浏览文件 @
a30b8c3f
...
...
@@ -91,4 +91,5 @@ class TestSSD(TestFasterRCNN):
if
__name__
==
'__main__'
:
paddle
.
enable_static
()
unittest
.
main
()
slim/distillation/distill.py
浏览文件 @
a30b8c3f
...
...
@@ -26,6 +26,7 @@ import numpy as np
from
collections
import
OrderedDict
from
paddleslim.dist.single_distiller
import
merge
,
l2_loss
import
paddle
from
paddle
import
fluid
from
ppdet.core.workspace
import
load_config
,
merge_config
,
create
from
ppdet.data.reader
import
create_reader
...
...
@@ -371,6 +372,7 @@ def main():
if
__name__
==
'__main__'
:
paddle
.
enable_static
()
parser
=
ArgsParser
()
parser
.
add_argument
(
"-r"
,
...
...
slim/extensions/distill_pruned_model/distill_pruned_model.py
浏览文件 @
a30b8c3f
...
...
@@ -29,6 +29,7 @@ from paddleslim.dist.single_distiller import merge, l2_loss
from
paddleslim.prune
import
Pruner
from
paddleslim.analysis
import
flops
import
paddle
from
paddle
import
fluid
from
ppdet.core.workspace
import
load_config
,
merge_config
,
create
from
ppdet.data.reader
import
create_reader
...
...
@@ -359,6 +360,7 @@ def main():
if
__name__
==
'__main__'
:
paddle
.
enable_static
()
parser
=
ArgsParser
()
parser
.
add_argument
(
"-t"
,
...
...
slim/nas/train_nas.py
浏览文件 @
a30b8c3f
...
...
@@ -27,6 +27,7 @@ import numpy as np
import
datetime
from
collections
import
deque
import
paddle
from
paddle
import
fluid
from
ppdet.experimental
import
mixed_precision_context
...
...
@@ -378,6 +379,7 @@ def main():
if
__name__
==
'__main__'
:
paddle
.
enable_static
()
parser
=
ArgsParser
()
parser
.
add_argument
(
"-r"
,
...
...
slim/prune/eval.py
浏览文件 @
a30b8c3f
...
...
@@ -23,6 +23,7 @@ parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 3)))
if
parent_path
not
in
sys
.
path
:
sys
.
path
.
append
(
parent_path
)
import
paddle
import
paddle.fluid
as
fluid
from
paddleslim.prune
import
Pruner
from
paddleslim.analysis
import
flops
...
...
@@ -199,6 +200,7 @@ def main():
if
__name__
==
'__main__'
:
paddle
.
enable_static
()
parser
=
ArgsParser
()
parser
.
add_argument
(
"--json_eval"
,
...
...
slim/prune/export_model.py
浏览文件 @
a30b8c3f
...
...
@@ -22,6 +22,7 @@ parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 3)))
if
parent_path
not
in
sys
.
path
:
sys
.
path
.
append
(
parent_path
)
import
paddle
from
paddle
import
fluid
from
ppdet.core.workspace
import
load_config
,
merge_config
,
create
...
...
@@ -97,6 +98,7 @@ def main():
if
__name__
==
'__main__'
:
paddle
.
enable_static
()
parser
=
ArgsParser
()
parser
.
add_argument
(
"--output_dir"
,
...
...
slim/prune/infer.py
浏览文件 @
a30b8c3f
...
...
@@ -26,6 +26,7 @@ import glob
import
numpy
as
np
from
PIL
import
Image
import
paddle
from
paddle
import
fluid
from
paddleslim.prune
import
Pruner
from
paddleslim.analysis
import
flops
...
...
@@ -223,6 +224,7 @@ def main():
if
__name__
==
'__main__'
:
paddle
.
enable_static
()
parser
=
ArgsParser
()
parser
.
add_argument
(
"--infer_dir"
,
...
...
slim/prune/prune.py
浏览文件 @
a30b8c3f
...
...
@@ -29,6 +29,7 @@ import datetime
from
collections
import
deque
from
paddleslim.prune
import
Pruner
from
paddleslim.analysis
import
flops
import
paddle
from
paddle
import
fluid
from
ppdet.experimental
import
mixed_precision_context
...
...
@@ -347,6 +348,7 @@ def main():
if
__name__
==
'__main__'
:
paddle
.
enable_static
()
parser
=
ArgsParser
()
parser
.
add_argument
(
"-r"
,
...
...
slim/quantization/eval.py
浏览文件 @
a30b8c3f
...
...
@@ -23,6 +23,7 @@ parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 3)))
if
parent_path
not
in
sys
.
path
:
sys
.
path
.
append
(
parent_path
)
import
paddle
import
paddle.fluid
as
fluid
from
ppdet.utils.eval_utils
import
parse_fetches
,
eval_run
,
eval_results
,
json_eval_results
...
...
@@ -156,6 +157,7 @@ def main():
if
__name__
==
'__main__'
:
paddle
.
enable_static
()
parser
=
ArgsParser
()
parser
.
add_argument
(
"--json_eval"
,
...
...
slim/quantization/export_model.py
浏览文件 @
a30b8c3f
...
...
@@ -22,6 +22,7 @@ parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 3)))
if
parent_path
not
in
sys
.
path
:
sys
.
path
.
append
(
parent_path
)
import
paddle
from
paddle
import
fluid
from
ppdet.core.workspace
import
load_config
,
merge_config
,
create
...
...
@@ -90,6 +91,7 @@ def main():
if
__name__
==
'__main__'
:
paddle
.
enable_static
()
parser
=
ArgsParser
()
parser
.
add_argument
(
"--output_dir"
,
...
...
slim/quantization/infer.py
浏览文件 @
a30b8c3f
...
...
@@ -26,6 +26,7 @@ import glob
import
numpy
as
np
from
PIL
import
Image
import
paddle
from
paddle
import
fluid
from
ppdet.core.workspace
import
load_config
,
merge_config
,
create
...
...
@@ -168,6 +169,7 @@ def main():
if
__name__
==
'__main__'
:
paddle
.
enable_static
()
parser
=
ArgsParser
()
parser
.
add_argument
(
"--infer_dir"
,
...
...
slim/quantization/train.py
浏览文件 @
a30b8c3f
...
...
@@ -28,6 +28,7 @@ import datetime
from
collections
import
deque
import
shutil
import
paddle
from
paddle
import
fluid
from
ppdet.core.workspace
import
load_config
,
merge_config
,
create
...
...
@@ -296,6 +297,7 @@ def main():
if
__name__
==
'__main__'
:
paddle
.
enable_static
()
parser
=
ArgsParser
()
parser
.
add_argument
(
"--loss_scale"
,
...
...
slim/sensitive/sensitive.py
浏览文件 @
a30b8c3f
...
...
@@ -27,6 +27,7 @@ import numpy as np
import
datetime
from
collections
import
deque
import
paddle
from
paddle
import
fluid
from
ppdet.experimental
import
mixed_precision_context
from
ppdet.core.workspace
import
load_config
,
merge_config
,
create
...
...
@@ -167,6 +168,7 @@ def main():
if
__name__
==
'__main__'
:
paddle
.
enable_static
()
parser
=
ArgsParser
()
parser
.
add_argument
(
"--output_eval"
,
...
...
tools/eval.py
浏览文件 @
a30b8c3f
...
...
@@ -22,6 +22,7 @@ parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 2)))
if
parent_path
not
in
sys
.
path
:
sys
.
path
.
append
(
parent_path
)
import
paddle
import
paddle.fluid
as
fluid
from
ppdet.utils.eval_utils
import
parse_fetches
,
eval_run
,
eval_results
,
json_eval_results
...
...
@@ -161,6 +162,7 @@ def main():
if
__name__
==
'__main__'
:
paddle
.
enable_static
()
parser
=
ArgsParser
()
parser
.
add_argument
(
"--json_eval"
,
...
...
tools/export_model.py
浏览文件 @
a30b8c3f
...
...
@@ -23,6 +23,7 @@ parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 2)))
if
parent_path
not
in
sys
.
path
:
sys
.
path
.
append
(
parent_path
)
import
paddle
from
paddle
import
fluid
from
ppdet.core.workspace
import
load_config
,
merge_config
,
create
...
...
@@ -71,6 +72,7 @@ def main():
if
__name__
==
'__main__'
:
paddle
.
enable_static
()
parser
=
ArgsParser
()
parser
.
add_argument
(
"--output_dir"
,
...
...
tools/export_serving_model.py
浏览文件 @
a30b8c3f
...
...
@@ -22,6 +22,7 @@ parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 2)))
if
parent_path
not
in
sys
.
path
:
sys
.
path
.
append
(
parent_path
)
import
paddle
from
paddle
import
fluid
from
ppdet.core.workspace
import
load_config
,
merge_config
,
create
...
...
@@ -94,6 +95,7 @@ def main():
if
__name__
==
'__main__'
:
paddle
.
enable_static
()
parser
=
ArgsParser
()
parser
.
add_argument
(
"--output_dir"
,
...
...
tools/face_eval.py
浏览文件 @
a30b8c3f
...
...
@@ -23,6 +23,7 @@ parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 2)))
if
parent_path
not
in
sys
.
path
:
sys
.
path
.
append
(
parent_path
)
import
paddle
import
paddle.fluid
as
fluid
import
numpy
as
np
import
cv2
...
...
@@ -270,6 +271,7 @@ def main():
if
__name__
==
'__main__'
:
paddle
.
enable_static
()
parser
=
ArgsParser
()
parser
.
add_argument
(
"-f"
,
...
...
tools/infer.py
浏览文件 @
a30b8c3f
...
...
@@ -27,6 +27,7 @@ import numpy as np
import
six
from
PIL
import
Image
import
paddle
from
paddle
import
fluid
from
ppdet.core.workspace
import
load_config
,
merge_config
,
create
...
...
@@ -233,6 +234,7 @@ def main():
if
__name__
==
'__main__'
:
paddle
.
enable_static
()
parser
=
ArgsParser
()
parser
.
add_argument
(
"--infer_dir"
,
...
...
tools/train.py
浏览文件 @
a30b8c3f
...
...
@@ -30,6 +30,7 @@ import six
from
collections
import
deque
from
paddle.fluid
import
profiler
import
paddle
from
paddle
import
fluid
from
paddle.fluid.layers.learning_rate_scheduler
import
_decay_step_counter
from
paddle.fluid.optimizer
import
ExponentialMovingAverage
...
...
@@ -316,6 +317,7 @@ def main():
if
__name__
==
'__main__'
:
paddle
.
enable_static
()
parser
=
ArgsParser
()
parser
.
add_argument
(
"-r"
,
...
...
tools/train_multi_machine.py
浏览文件 @
a30b8c3f
...
...
@@ -28,6 +28,7 @@ import random
import
datetime
import
six
from
collections
import
deque
import
paddle
from
paddle.fluid
import
profiler
from
paddle
import
fluid
...
...
@@ -309,6 +310,7 @@ def main():
if
__name__
==
'__main__'
:
paddle
.
enable_static
()
parser
=
ArgsParser
()
parser
.
add_argument
(
"-r"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录