Merge pull request #1185 from backyes/fix_bug_virtual_update

fix bug: update function can not be inherited by subclass, otherwise BUG comes.
avx_docs
Yu Yang 8 years ago committed by GitHub
commit 50e525ca37

@ -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) {}
};
/**

Loading…
Cancel
Save