summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoe Zhao <ztuowen@gmail.com>2014-10-08 19:16:16 +0800
committerJoe Zhao <ztuowen@gmail.com>2014-10-08 19:16:16 +0800
commit497611e62608564561fb1e123725281991ae05f0 (patch)
tree6a058417174796f4c1b40b47081f0b011fc80fbf /src
parent2386b2acc2d0f94b04a0f7f2767a8b0404aff36d (diff)
downloadtnet-497611e62608564561fb1e123725281991ae05f0.tar.gz
tnet-497611e62608564561fb1e123725281991ae05f0.tar.bz2
tnet-497611e62608564561fb1e123725281991ae05f0.zip
Reorder
Diffstat (limited to 'src')
-rw-r--r--src/CuTNetLib/cuMisc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/CuTNetLib/cuMisc.h b/src/CuTNetLib/cuMisc.h
index 3447739..4d25a05 100644
--- a/src/CuTNetLib/cuMisc.h
+++ b/src/CuTNetLib/cuMisc.h
@@ -581,11 +581,15 @@ namespace TNet {
/// Set input vector (bind with the preceding NetworkComponent)
void SetInput(const CuMatrix<BaseFloat>& rInput,int pos=0)
{
+ if (pos == 0)
+ mpInput = &rInput;
PipeVec[pos]->SetInput(rInput);
}
/// Set error input vector (bind with the following NetworkComponent)
void SetErrorInput(const CuMatrix<BaseFloat>& rErrorInput,int pos=0)
{
+ if (pos == 0)
+ mpErrorInput = &rErrorInput;
PipeVec[Order[pos]]->SetErrorInput(rErrorInput);
}