Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
22aacbfd
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看板
提交
22aacbfd
编写于
12月 21, 2016
作者:
Y
Yu Yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add const to GradientMachine::eval
上级
2965df51
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
9 addition
and
9 deletion
+9
-9
paddle/gserver/gradientmachines/GradientMachine.h
paddle/gserver/gradientmachines/GradientMachine.h
+1
-1
paddle/gserver/gradientmachines/MultiGradientMachine.cpp
paddle/gserver/gradientmachines/MultiGradientMachine.cpp
+1
-1
paddle/gserver/gradientmachines/MultiGradientMachine.h
paddle/gserver/gradientmachines/MultiGradientMachine.h
+1
-1
paddle/gserver/gradientmachines/MultiNetwork.cpp
paddle/gserver/gradientmachines/MultiNetwork.cpp
+1
-1
paddle/gserver/gradientmachines/MultiNetwork.h
paddle/gserver/gradientmachines/MultiNetwork.h
+1
-1
paddle/gserver/gradientmachines/NeuralNetwork.cpp
paddle/gserver/gradientmachines/NeuralNetwork.cpp
+1
-1
paddle/gserver/gradientmachines/NeuralNetwork.h
paddle/gserver/gradientmachines/NeuralNetwork.h
+1
-1
paddle/gserver/gradientmachines/RecurrentGradientMachine.cpp
paddle/gserver/gradientmachines/RecurrentGradientMachine.cpp
+1
-1
paddle/gserver/gradientmachines/RecurrentGradientMachine.h
paddle/gserver/gradientmachines/RecurrentGradientMachine.h
+1
-1
未找到文件。
paddle/gserver/gradientmachines/GradientMachine.h
浏览文件 @
22aacbfd
...
...
@@ -186,7 +186,7 @@ public:
/**
* evaluate using the given evaluator
*/
virtual
void
eval
(
Evaluator
*
evaluator
)
=
0
;
virtual
void
eval
(
Evaluator
*
evaluator
)
const
=
0
;
std
::
vector
<
ParameterPtr
>&
getParameters
()
{
return
parameters_
;
}
...
...
paddle/gserver/gradientmachines/MultiGradientMachine.cpp
浏览文件 @
22aacbfd
...
...
@@ -331,7 +331,7 @@ Evaluator* MultiGradientMachine::makeEvaluator() {
return
threads_
[
0
]
->
getGradientMachine
()
->
makeEvaluator
();
}
void
MultiGradientMachine
::
eval
(
Evaluator
*
evaluator
)
{
void
MultiGradientMachine
::
eval
(
Evaluator
*
evaluator
)
const
{
for
(
auto
&
thread
:
threads_
)
{
SetDevice
device
(
thread
->
getDeviceId
());
thread
->
getGradientMachine
()
->
eval
(
evaluator
);
...
...
paddle/gserver/gradientmachines/MultiGradientMachine.h
浏览文件 @
22aacbfd
...
...
@@ -195,7 +195,7 @@ public:
virtual
Evaluator
*
makeEvaluator
();
virtual
void
eval
(
Evaluator
*
evaluator
);
virtual
void
eval
(
Evaluator
*
evaluator
)
const
;
bool
useGpu
()
const
{
return
useGpu_
;
}
...
...
paddle/gserver/gradientmachines/MultiNetwork.cpp
浏览文件 @
22aacbfd
...
...
@@ -181,6 +181,6 @@ Evaluator* MultiNetwork::makeEvaluator() {
return
multiCombinedEvaluator
;
}
void
MultiNetwork
::
eval
(
Evaluator
*
evaluator
)
{
evaluator
->
eval
(
*
this
);
}
void
MultiNetwork
::
eval
(
Evaluator
*
evaluator
)
const
{
evaluator
->
eval
(
*
this
);
}
}
// namespace paddle
paddle/gserver/gradientmachines/MultiNetwork.h
浏览文件 @
22aacbfd
...
...
@@ -48,7 +48,7 @@ public:
virtual
Evaluator
*
makeEvaluator
();
virtual
void
eval
(
Evaluator
*
evaluator
);
virtual
void
eval
(
Evaluator
*
evaluator
)
const
;
const
std
::
vector
<
std
::
unique_ptr
<
NeuralNetwork
>>&
getSubNetworks
()
const
{
return
subNetworks_
;
...
...
paddle/gserver/gradientmachines/NeuralNetwork.cpp
浏览文件 @
22aacbfd
...
...
@@ -383,7 +383,7 @@ Evaluator* NeuralNetwork::makeEvaluator() {
return
combinedEvaluator
;
}
void
NeuralNetwork
::
eval
(
Evaluator
*
evaluator
)
{
evaluator
->
eval
(
*
this
);
}
void
NeuralNetwork
::
eval
(
Evaluator
*
evaluator
)
const
{
evaluator
->
eval
(
*
this
);
}
void
NeuralNetwork
::
setOutputGrad
(
const
std
::
vector
<
Argument
>&
args
)
{
CHECK_GE
(
outputLayers_
.
size
(),
args
.
size
());
...
...
paddle/gserver/gradientmachines/NeuralNetwork.h
浏览文件 @
22aacbfd
...
...
@@ -98,7 +98,7 @@ public:
virtual
Evaluator
*
makeEvaluator
();
virtual
void
eval
(
Evaluator
*
evaluator
);
virtual
void
eval
(
Evaluator
*
evaluator
)
const
;
virtual
void
resetState
();
virtual
void
setOutputGrad
(
const
std
::
vector
<
Argument
>&
args
);
...
...
paddle/gserver/gradientmachines/RecurrentGradientMachine.cpp
浏览文件 @
22aacbfd
...
...
@@ -593,7 +593,7 @@ void RecurrentGradientMachine::forwardBackward(
LOG
(
FATAL
)
<<
"should not use this function"
;
}
void
RecurrentGradientMachine
::
eval
(
Evaluator
*
evaluator
)
{
void
RecurrentGradientMachine
::
eval
(
Evaluator
*
evaluator
)
const
{
// call printers frame by frame
for
(
int
i
=
0
;
i
<
maxSequenceLength_
;
++
i
)
{
LOG
(
INFO
)
<<
"Recurrent Layer Group eval frame "
<<
i
<<
" begin"
;
...
...
paddle/gserver/gradientmachines/RecurrentGradientMachine.h
浏览文件 @
22aacbfd
...
...
@@ -63,7 +63,7 @@ public:
const
UpdateCallback
&
callback
);
virtual
void
resetState
()
{}
virtual
void
eval
(
Evaluator
*
evaluator
);
virtual
void
eval
(
Evaluator
*
evaluator
)
const
;
const
std
::
vector
<
int
>&
getParameterIds
()
{
return
parameterIds_
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录