提交 50e525ca 编写于 作者: Y Yu Yang 提交者: GitHub

Merge pull request #1185 from backyes/fix_bug_virtual_update

fix bug: update function can not be inherited by subclass, otherwise BUG comes.
......@@ -55,7 +55,7 @@ public:
// between startBatch() and finishBatch(), update() will be called
// by the trainer multiple times, each time for updating one Parameter
// with its gradient in PARAMETER_GRADIENT
virtual void update(Parameter* para) {
void update(Parameter* para) {
SetDevice setDevice(para->getDeviceId());
para->updateHook();
this->updateImpl(para);
......
......@@ -184,7 +184,6 @@ protected:
* @param para
*/
virtual void updateImpl(Parameter* para) {}
virtual void update(Parameter* para) {}
};
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册