summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Zhao <ztuowen@gmail.com>2014-10-06 13:15:54 +0800
committerJoe Zhao <ztuowen@gmail.com>2014-10-06 13:15:54 +0800
commit958c14d512670e5e2e563ef2af9311f5f40bd06f (patch)
treea5dad7c67b09fd134c56f4e2841fce883a305574
parenteddeb7926e08f8477f008fd2adb0414d1ba752e3 (diff)
downloadtnet-958c14d512670e5e2e563ef2af9311f5f40bd06f.tar.gz
tnet-958c14d512670e5e2e563ef2af9311f5f40bd06f.tar.bz2
tnet-958c14d512670e5e2e563ef2af9311f5f40bd06f.zip
add virtual
-rw-r--r--src/CuTNetLib/cuCompDisc.h4
-rw-r--r--src/CuTNetLib/cuComponent.h4
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) { }