Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
c95cd474
P
Paddle
项目概览
机器未来
/
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看板
未验证
提交
c95cd474
编写于
5月 30, 2018
作者:
F
fengjiayi
提交者:
GitHub
5月 30, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #10975 from JiayiFeng/fix_bug_in_uint8_support
Correct uint8 support
上级
3a29821b
4785c00e
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
8 addition
and
2 deletion
+8
-2
paddle/fluid/operators/cast_op.cc
paddle/fluid/operators/cast_op.cc
+1
-0
paddle/fluid/operators/cast_op.cu
paddle/fluid/operators/cast_op.cu
+1
-1
paddle/fluid/pybind/pybind.cc
paddle/fluid/pybind/pybind.cc
+3
-0
python/paddle/fluid/data_feeder.py
python/paddle/fluid/data_feeder.py
+3
-1
未找到文件。
paddle/fluid/operators/cast_op.cc
浏览文件 @
c95cd474
...
@@ -89,4 +89,5 @@ REGISTER_OP_CPU_KERNEL(cast, ops::CastOpKernel<CPU, float>,
...
@@ -89,4 +89,5 @@ REGISTER_OP_CPU_KERNEL(cast, ops::CastOpKernel<CPU, float>,
ops
::
CastOpKernel
<
CPU
,
int
>
,
ops
::
CastOpKernel
<
CPU
,
int
>
,
ops
::
CastOpKernel
<
CPU
,
int64_t
>
,
ops
::
CastOpKernel
<
CPU
,
int64_t
>
,
ops
::
CastOpKernel
<
CPU
,
bool
>
,
ops
::
CastOpKernel
<
CPU
,
bool
>
,
ops
::
CastOpKernel
<
CPU
,
uint8_t
>
,
ops
::
CastOpKernel
<
CPU
,
paddle
::
platform
::
float16
>
);
ops
::
CastOpKernel
<
CPU
,
paddle
::
platform
::
float16
>
);
paddle/fluid/operators/cast_op.cu
浏览文件 @
c95cd474
...
@@ -21,5 +21,5 @@ using CastOpKernel =
...
@@ -21,5 +21,5 @@ using CastOpKernel =
REGISTER_OP_CUDA_KERNEL
(
cast
,
CastOpKernel
<
float
>
,
CastOpKernel
<
double
>
,
REGISTER_OP_CUDA_KERNEL
(
cast
,
CastOpKernel
<
float
>
,
CastOpKernel
<
double
>
,
CastOpKernel
<
int
>
,
CastOpKernel
<
int64_t
>
,
CastOpKernel
<
int
>
,
CastOpKernel
<
int64_t
>
,
CastOpKernel
<
bool
>
,
CastOpKernel
<
bool
>
,
CastOpKernel
<
uint8_t
>
,
CastOpKernel
<
paddle
::
platform
::
float16
>
);
CastOpKernel
<
paddle
::
platform
::
float16
>
);
paddle/fluid/pybind/pybind.cc
浏览文件 @
c95cd474
...
@@ -117,6 +117,7 @@ PYBIND11_PLUGIN(core) {
...
@@ -117,6 +117,7 @@ PYBIND11_PLUGIN(core) {
.
def
(
"set"
,
PyCPUTensorSetFromArray
<
int64_t
>
)
.
def
(
"set"
,
PyCPUTensorSetFromArray
<
int64_t
>
)
.
def
(
"set"
,
PyCPUTensorSetFromArray
<
bool
>
)
.
def
(
"set"
,
PyCPUTensorSetFromArray
<
bool
>
)
.
def
(
"set"
,
PyCPUTensorSetFromArray
<
uint16_t
>
)
.
def
(
"set"
,
PyCPUTensorSetFromArray
<
uint16_t
>
)
.
def
(
"set"
,
PyCPUTensorSetFromArray
<
uint8_t
>
)
#ifdef PADDLE_WITH_CUDA
#ifdef PADDLE_WITH_CUDA
.
def
(
"set"
,
PyCUDATensorSetFromArray
<
float
>
)
.
def
(
"set"
,
PyCUDATensorSetFromArray
<
float
>
)
.
def
(
"set"
,
PyCUDATensorSetFromArray
<
int
>
)
.
def
(
"set"
,
PyCUDATensorSetFromArray
<
int
>
)
...
@@ -124,12 +125,14 @@ PYBIND11_PLUGIN(core) {
...
@@ -124,12 +125,14 @@ PYBIND11_PLUGIN(core) {
.
def
(
"set"
,
PyCUDATensorSetFromArray
<
int64_t
>
)
.
def
(
"set"
,
PyCUDATensorSetFromArray
<
int64_t
>
)
.
def
(
"set"
,
PyCUDATensorSetFromArray
<
bool
>
)
.
def
(
"set"
,
PyCUDATensorSetFromArray
<
bool
>
)
.
def
(
"set"
,
PyCUDATensorSetFromArray
<
uint16_t
>
)
.
def
(
"set"
,
PyCUDATensorSetFromArray
<
uint16_t
>
)
.
def
(
"set"
,
PyCUDATensorSetFromArray
<
uint8_t
>
)
.
def
(
"set"
,
PyCUDAPinnedTensorSetFromArray
<
float
>
)
.
def
(
"set"
,
PyCUDAPinnedTensorSetFromArray
<
float
>
)
.
def
(
"set"
,
PyCUDAPinnedTensorSetFromArray
<
int
>
)
.
def
(
"set"
,
PyCUDAPinnedTensorSetFromArray
<
int
>
)
.
def
(
"set"
,
PyCUDAPinnedTensorSetFromArray
<
double
>
)
.
def
(
"set"
,
PyCUDAPinnedTensorSetFromArray
<
double
>
)
.
def
(
"set"
,
PyCUDAPinnedTensorSetFromArray
<
int64_t
>
)
.
def
(
"set"
,
PyCUDAPinnedTensorSetFromArray
<
int64_t
>
)
.
def
(
"set"
,
PyCUDAPinnedTensorSetFromArray
<
bool
>
)
.
def
(
"set"
,
PyCUDAPinnedTensorSetFromArray
<
bool
>
)
.
def
(
"set"
,
PyCUDAPinnedTensorSetFromArray
<
uint16_t
>
)
.
def
(
"set"
,
PyCUDAPinnedTensorSetFromArray
<
uint16_t
>
)
.
def
(
"set"
,
PyCUDAPinnedTensorSetFromArray
<
uint8_t
>
)
#endif
#endif
.
def
(
"shape"
,
[](
Tensor
&
self
)
{
return
vectorize
(
self
.
dims
());
})
.
def
(
"shape"
,
[](
Tensor
&
self
)
{
return
vectorize
(
self
.
dims
());
})
.
def
(
"set_float_element"
,
TensorSetElement
<
float
>
)
.
def
(
"set_float_element"
,
TensorSetElement
<
float
>
)
...
...
python/paddle/fluid/data_feeder.py
浏览文件 @
c95cd474
...
@@ -36,9 +36,11 @@ class DataToLoDTensorConverter(object):
...
@@ -36,9 +36,11 @@ class DataToLoDTensorConverter(object):
self
.
dtype
=
'float64'
self
.
dtype
=
'float64'
elif
dtype
==
core
.
VarDesc
.
VarType
.
INT32
:
elif
dtype
==
core
.
VarDesc
.
VarType
.
INT32
:
self
.
dtype
=
'int32'
self
.
dtype
=
'int32'
elif
dtype
==
core
.
VarDesc
.
VarType
.
UINT8
:
self
.
dtype
=
'uint8'
else
:
else
:
raise
ValueError
(
"dtype must be any of [int32, float32, int64, "
raise
ValueError
(
"dtype must be any of [int32, float32, int64, "
"float64]"
)
"float64
, uint8
]"
)
self
.
data
=
[]
self
.
data
=
[]
self
.
lod
=
[]
self
.
lod
=
[]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录