From 2386b2acc2d0f94b04a0f7f2767a8b0404aff36d Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Wed, 8 Oct 2014 18:22:35 +0800 Subject: add getin & get out++++++ --- src/CuTNetLib/cuMisc.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/CuTNetLib/cuMisc.h b/src/CuTNetLib/cuMisc.h index 137dbcf..3447739 100644 --- a/src/CuTNetLib/cuMisc.h +++ b/src/CuTNetLib/cuMisc.h @@ -116,7 +116,7 @@ namespace TNet { { public: CuDistrib(size_t nInputs, size_t nOutputs, CuComponent* pPred) - : CuComponent(nInputs,nOutputs,pPred),size(0),ErrInputVec() + : CuComponent(nInputs,nOutputs,pPred),size(0),ErrorInputVec() { } @@ -132,9 +132,9 @@ namespace TNet { void ReadFromStream(std::istream& rIn) { rIn >> std::ws >> size; - ErrInputVec.clear(); + ErrorInputVec.clear(); for (int i=0; i& GetErrorInput(int pos=0) { if (pos>=0 && pos& rErrorInput,int pos=0) @@ -165,7 +165,7 @@ namespace TNet { if (pos==0) mpErrorInput=&rErrorInput; if (pos>=0 && pos Scale; }; @@ -300,10 +300,12 @@ namespace TNet { delete OutputVec[i]; rIn >> std::ws >> size; OutputVec.clear(); + ErrorInputVec.clear(); for (int i=0; i>len; OutputVec.push_back(new CuMatrix()); + ErrorInputVec.push_back(NULL); SectLen.push_back(len); } } @@ -409,10 +411,12 @@ namespace TNet { delete ErrorOutputVec[i]; rIn >> std::ws >> size; ErrorOutputVec.clear(); + InputVec.clear(); for (int i=0; i>len; ErrorOutputVec.push_back(new CuMatrix()); + InputVec.push_back(NULL); SectLen.push_back(len); } } -- cgit v1.2.3-70-g09d2