Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
48b4c306
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
48b4c306
编写于
12月 28, 2016
作者:
H
hedaoyuan
提交者:
GitHub
12月 28, 2016
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1006 from hedaoyuan/fix_973
follow some comments with issue 973
上级
9efb8895
dc1ee444
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
13 addition
and
14 deletion
+13
-14
paddle/function/CMakeLists.txt
paddle/function/CMakeLists.txt
+5
-5
paddle/function/CrossMapNormalOp.cpp
paddle/function/CrossMapNormalOp.cpp
+1
-1
paddle/function/CrossMapNormalOp.h
paddle/function/CrossMapNormalOp.h
+0
-0
paddle/function/CrossMapNormalOpGpu.cu
paddle/function/CrossMapNormalOpGpu.cu
+1
-1
paddle/function/CrossMapNormalOpTest.cpp
paddle/function/CrossMapNormalOpTest.cpp
+4
-0
paddle/function/Function.cpp
paddle/function/Function.cpp
+2
-2
paddle/function/FunctionTest.h
paddle/function/FunctionTest.h
+0
-5
未找到文件。
paddle/function/CMakeLists.txt
浏览文件 @
48b4c306
file
(
GLOB h_files . *
_o
p.h
)
file
(
GLOB cpp_files . *
_o
p.cpp
)
file
(
GLOB h_files . *
O
p.h
)
file
(
GLOB cpp_files . *
O
p.cpp
)
list
(
APPEND h_files Function.h
)
list
(
APPEND cpp_files Function.cpp
)
if
(
WITH_GPU
)
file
(
GLOB cu_files . *
_op_g
pu.cu
)
file
(
GLOB cu_files . *
OpG
pu.cu
)
cuda_compile
(
cu_objs
${
cu_files
}
)
endif
()
...
...
@@ -15,9 +15,9 @@ add_library(paddle_test_main STATIC TestMain.cpp)
if
(
WITH_GPU
)
# TODO:
# file(GLOB test_files . *
_op_t
est.cpp)
# file(GLOB test_files . *
OpT
est.cpp)
# add_executable(${test_bin} EXCLUDE_FROM_ALL ${test_files})
add_simple_unittest
(
cross_map_normal_op_t
est
)
add_simple_unittest
(
CrossMapNormalOpT
est
)
endif
()
add_style_check_target
(
paddle_function
${
h_files
}
)
...
...
paddle/function/
cross_map_normal_o
p.cpp
→
paddle/function/
CrossMapNormalO
p.cpp
浏览文件 @
48b4c306
...
...
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include "
cross_map_normal_o
p.h"
#include "
CrossMapNormalO
p.h"
#include "paddle/math/Vector.h"
namespace
paddle
{
...
...
paddle/function/
cross_map_normal_o
p.h
→
paddle/function/
CrossMapNormalO
p.h
浏览文件 @
48b4c306
文件已移动
paddle/function/
cross_map_normal_op_g
pu.cu
→
paddle/function/
CrossMapNormalOpG
pu.cu
浏览文件 @
48b4c306
...
...
@@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License. */
#include "hl_base.h"
#include "
cross_map_normal_o
p.h"
#include "
CrossMapNormalO
p.h"
namespace
paddle
{
...
...
paddle/function/
cross_map_normal_op_t
est.cpp
→
paddle/function/
CrossMapNormalOpT
est.cpp
浏览文件 @
48b4c306
...
...
@@ -15,6 +15,8 @@ limitations under the License. */
#include <gtest/gtest.h>
#include "FunctionTest.h"
namespace
paddle
{
TEST
(
CrossMapNormal
,
real
)
{
for
(
size_t
numSamples
:
{
5
,
32
})
{
for
(
size_t
channels
:
{
1
,
5
,
32
})
{
...
...
@@ -69,3 +71,5 @@ TEST(CrossMapNormalGrad, real) {
}
}
}
}
// namespace paddle
paddle/function/Function.cpp
浏览文件 @
48b4c306
...
...
@@ -32,14 +32,14 @@ real FuncConfig::get<real>(const std::string& key) const {
template
<
>
FuncConfig
&
FuncConfig
::
set
<
size_t
>
(
const
std
::
string
&
key
,
size_t
v
)
{
CHECK
(
valueMap_
.
count
(
key
)
==
0
)
<<
"Duplicated value: "
<<
key
;
CHECK
_EQ
(
valueMap_
.
count
(
key
),
0
)
<<
"Duplicated value: "
<<
key
;
valueMap_
[
key
].
s
=
v
;
return
*
this
;
}
template
<
>
FuncConfig
&
FuncConfig
::
set
<
real
>
(
const
std
::
string
&
key
,
real
v
)
{
CHECK
(
valueMap_
.
count
(
key
)
==
0
)
<<
"Duplicated value: "
<<
key
;
CHECK
_EQ
(
valueMap_
.
count
(
key
),
0
)
<<
"Duplicated value: "
<<
key
;
valueMap_
[
key
].
r
=
v
;
return
*
this
;
}
...
...
paddle/function/FunctionTest.h
浏览文件 @
48b4c306
...
...
@@ -95,8 +95,3 @@ protected:
};
}
// namespace paddle
using
paddle
::
FunctionCompare
;
using
paddle
::
FuncConfig
;
using
paddle
::
Dims
;
using
paddle
::
Tensor
;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录