From 958c14d512670e5e2e563ef2af9311f5f40bd06f Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Mon, 6 Oct 2014 13:15:54 +0800 Subject: add virtual --- src/CuTNetLib/cuCompDisc.h | 4 +++- src/CuTNetLib/cuComponent.h | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/CuTNetLib/cuCompDisc.h b/src/CuTNetLib/cuCompDisc.h index 937b785..64139c2 100644 --- a/src/CuTNetLib/cuCompDisc.h +++ b/src/CuTNetLib/cuCompDisc.h @@ -40,7 +40,9 @@ namespace TNet { } } - + virtual void Propagate(); + virtual void Backpropagate(); + void Momentum(BaseFloat mmt) { mMomentum = mmt; diff --git a/src/CuTNetLib/cuComponent.h b/src/CuTNetLib/cuComponent.h index fc9666c..9eec461 100644 --- a/src/CuTNetLib/cuComponent.h +++ b/src/CuTNetLib/cuComponent.h @@ -136,10 +136,10 @@ namespace TNet { /// Perform forward pass propagateion Input->Output, /// wrapper for the PropagateFnc method - void Propagate(); + virtual void Propagate(); /// Perform backward pass propagateion ErrorInput->ErrorOutput, /// wrapper for the BackpropagateFnc method - void Backpropagate(); + virtual void Backpropagate(); /// Reads the component parameters from stream virtual void ReadFromStream(std::istream& rIn) { } -- cgit v1.2.3-70-g09d2