From e246076a03c2496ca8ef814b174b5b741928a1b6 Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Mon, 6 Oct 2014 14:44:10 +0800 Subject: Virtual 4 --- src/CuTNetLib/cuComponent.h | 20 ++++++++++---------- 1 file 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& GetInput(int pos=0); @@ -130,9 +130,9 @@ namespace TNet { virtual const CuMatrix& GetErrorOutput(int pos=0); /// Set input vector (bind with the preceding NetworkComponent) - void SetInput(const CuMatrix& rInput,int pos=0); + virtual void SetInput(const CuMatrix& rInput,int pos=0); /// Set error input vector (bind with the following NetworkComponent) - void SetErrorInput(const CuMatrix& rErrorInput,int pos=0); + virtual void SetErrorInput(const CuMatrix& 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& + const CuMatrix& CuComponent:: GetInput(int pos) { @@ -338,14 +338,14 @@ namespace TNet { return *mpInput; } - virtual const CuMatrix& + const CuMatrix& CuComponent:: GetOutput(int pos) { return mOutput; } - virtual const CuMatrix& + const CuMatrix& CuComponent:: GetErrorInput(int pos) { @@ -353,7 +353,7 @@ namespace TNet { return *mpErrorInput; } - virtual const CuMatrix& + const CuMatrix& 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; } -- cgit v1.2.3-70-g09d2