Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
b96dada4
P
Paddle
项目概览
Crayon鑫
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
b96dada4
编写于
12月 16, 2020
作者:
H
huangxu96
提交者:
GitHub
12月 16, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add static.amp into setup.pu.in (#29621)
* add static.amp into setup.pu.in * add unittest for api
上级
1e9127f6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
7 addition
and
4 deletion
+7
-4
python/paddle/fluid/contrib/tests/test_image_classification_fp16.py
...dle/fluid/contrib/tests/test_image_classification_fp16.py
+3
-2
python/paddle/fluid/contrib/tests/test_multi_precision_fp16_train.py
...le/fluid/contrib/tests/test_multi_precision_fp16_train.py
+2
-2
python/paddle/static/__init__.py
python/paddle/static/__init__.py
+1
-0
python/setup.py.in
python/setup.py.in
+1
-0
未找到文件。
python/paddle/fluid/contrib/tests/test_image_classification_fp16.py
浏览文件 @
b96dada4
...
@@ -24,6 +24,7 @@ import unittest
...
@@ -24,6 +24,7 @@ import unittest
import
os
import
os
import
copy
import
copy
import
numpy
as
np
import
numpy
as
np
from
paddle.static.amp
import
decorate
paddle
.
enable_static
()
paddle
.
enable_static
()
...
@@ -138,7 +139,7 @@ def train(net_type, use_cuda, save_dirname, is_local):
...
@@ -138,7 +139,7 @@ def train(net_type, use_cuda, save_dirname, is_local):
amp_lists
=
fluid
.
contrib
.
mixed_precision
.
AutoMixedPrecisionLists
(
amp_lists
=
fluid
.
contrib
.
mixed_precision
.
AutoMixedPrecisionLists
(
custom_black_varnames
=
{
"loss"
,
"conv2d_0.w_0"
})
custom_black_varnames
=
{
"loss"
,
"conv2d_0.w_0"
})
mp_optimizer
=
fluid
.
contrib
.
mixed_precision
.
decorate
(
mp_optimizer
=
decorate
(
optimizer
=
optimizer
,
optimizer
=
optimizer
,
amp_lists
=
amp_lists
,
amp_lists
=
amp_lists
,
init_loss_scaling
=
8.0
,
init_loss_scaling
=
8.0
,
...
@@ -442,7 +443,7 @@ class TestAmpWithNonIterableDataLoader(unittest.TestCase):
...
@@ -442,7 +443,7 @@ class TestAmpWithNonIterableDataLoader(unittest.TestCase):
optimizer
=
fluid
.
optimizer
.
Lamb
(
learning_rate
=
0.001
)
optimizer
=
fluid
.
optimizer
.
Lamb
(
learning_rate
=
0.001
)
amp_lists
=
fluid
.
contrib
.
mixed_precision
.
AutoMixedPrecisionLists
(
amp_lists
=
fluid
.
contrib
.
mixed_precision
.
AutoMixedPrecisionLists
(
custom_black_varnames
=
{
"loss"
,
"conv2d_0.w_0"
})
custom_black_varnames
=
{
"loss"
,
"conv2d_0.w_0"
})
mp_optimizer
=
fluid
.
contrib
.
mixed_precision
.
decorate
(
mp_optimizer
=
decorate
(
optimizer
=
optimizer
,
optimizer
=
optimizer
,
amp_lists
=
amp_lists
,
amp_lists
=
amp_lists
,
init_loss_scaling
=
8.0
,
init_loss_scaling
=
8.0
,
...
...
python/paddle/fluid/contrib/tests/test_multi_precision_fp16_train.py
浏览文件 @
b96dada4
...
@@ -19,8 +19,8 @@ import paddle.fluid as fluid
...
@@ -19,8 +19,8 @@ import paddle.fluid as fluid
import
contextlib
import
contextlib
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
from
paddle.
fluid.contrib.mixed_precision.fp16_utils
import
cast_model_to_fp16
from
paddle.
static.amp
import
cast_model_to_fp16
from
paddle.
fluid.contrib.mixed_precision.fp16_utils
import
cast_parameters_to_fp16
from
paddle.
static.amp
import
cast_parameters_to_fp16
paddle
.
enable_static
()
paddle
.
enable_static
()
...
...
python/paddle/static/__init__.py
浏览文件 @
b96dada4
...
@@ -24,6 +24,7 @@ __all__ = [
...
@@ -24,6 +24,7 @@ __all__ = [
]
]
from
.
import
nn
from
.
import
nn
from
.
import
amp
from
.io
import
save_inference_model
#DEFINE_ALIAS
from
.io
import
save_inference_model
#DEFINE_ALIAS
from
.io
import
load_inference_model
#DEFINE_ALIAS
from
.io
import
load_inference_model
#DEFINE_ALIAS
from
..fluid
import
Scope
#DEFINE_ALIAS
from
..fluid
import
Scope
#DEFINE_ALIAS
...
...
python/setup.py.in
浏览文件 @
b96dada4
...
@@ -210,6 +210,7 @@ packages=['paddle',
...
@@ -210,6 +210,7 @@ packages=['paddle',
'paddle.metric',
'paddle.metric',
'paddle.static',
'paddle.static',
'paddle.static.nn',
'paddle.static.nn',
'paddle.static.amp',
'paddle.tensor',
'paddle.tensor',
'paddle.onnx',
'paddle.onnx',
]
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录