diff options
author | Joe Zhao <ztuowen@gmail.com> | 2014-10-06 14:44:10 +0800 |
---|---|---|
committer | Joe Zhao <ztuowen@gmail.com> | 2014-10-06 14:44:10 +0800 |
commit | e246076a03c2496ca8ef814b174b5b741928a1b6 (patch) | |
tree | ee8775ecd036b3ac52fed2577756014937fa3a35 | |
parent | 02d6c033467a40983264e457905130ced0b9b8d6 (diff) | |
download | tnet-e246076a03c2496ca8ef814b174b5b741928a1b6.tar.gz tnet-e246076a03c2496ca8ef814b174b5b741928a1b6.tar.bz2 tnet-e246076a03c2496ca8ef814b174b5b741928a1b6.zip |
Virtual 4
-rw-r--r-- | src/CuTNetLib/cuComponent.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/CuTNetLib/cuComponent.h b/src/CuTNetLib/cuComponent.h index c74a76f..364c828 100644 --- a/src/CuTNetLib/cuComponent.h +++ b/src/CuTNetLib/cuComponent.h @@ -119,9 +119,9 @@ namespace TNet { void SetNext(CuComponent* pNxt); /// Return the number of different inputs for complex component - int GetInSect() const; + virtual int GetInSect(); /// Return the number of different outputs for complex component - int GetOutSect() const; + virtual int GetOutSect(); /// IO Data getters virtual const CuMatrix<BaseFloat>& GetInput(int pos=0); @@ -130,9 +130,9 @@ namespace TNet { virtual const CuMatrix<BaseFloat>& GetErrorOutput(int pos=0); /// Set input vector (bind with the preceding NetworkComponent) - void SetInput(const CuMatrix<BaseFloat>& rInput,int pos=0); + virtual void SetInput(const CuMatrix<BaseFloat>& rInput,int pos=0); /// Set error input vector (bind with the following NetworkComponent) - void SetErrorInput(const CuMatrix<BaseFloat>& rErrorInput,int pos=0); + virtual void SetErrorInput(const CuMatrix<BaseFloat>& rErrorInput,int pos=0); /// Perform forward pass propagateion Input->Output, /// wrapper for the PropagateFnc method @@ -330,7 +330,7 @@ namespace TNet { mpErrorInput = &rErrorInput; } - virtual const CuMatrix<BaseFloat>& + const CuMatrix<BaseFloat>& CuComponent:: GetInput(int pos) { @@ -338,14 +338,14 @@ namespace TNet { return *mpInput; } - virtual const CuMatrix<BaseFloat>& + const CuMatrix<BaseFloat>& CuComponent:: GetOutput(int pos) { return mOutput; } - virtual const CuMatrix<BaseFloat>& + const CuMatrix<BaseFloat>& CuComponent:: GetErrorInput(int pos) { @@ -353,7 +353,7 @@ namespace TNet { return *mpErrorInput; } - virtual const CuMatrix<BaseFloat>& + const CuMatrix<BaseFloat>& CuComponent:: GetErrorOutput(int pos) { @@ -376,14 +376,14 @@ namespace TNet { inline int CuComponent:: - GetInSect() const + GetInSect() { return 1; } inline int CuComponent:: - GetOutSect() const + GetOutSect() { return 1; } |