diff options
author | Joe Zhao <ztuowen@gmail.com> | 2014-10-08 17:16:24 +0800 |
---|---|---|
committer | Joe Zhao <ztuowen@gmail.com> | 2014-10-08 17:16:24 +0800 |
commit | df8c51ab1f7153da6c91e29d9ff38af7864c5881 (patch) | |
tree | fc2264529fe885d87b057fd8fcb3801e022ee85f | |
parent | 65fdf7d0ffa877941cc00ed289af7d4902cdb465 (diff) | |
download | tnet-df8c51ab1f7153da6c91e29d9ff38af7864c5881.tar.gz tnet-df8c51ab1f7153da6c91e29d9ff38af7864c5881.tar.bz2 tnet-df8c51ab1f7153da6c91e29d9ff38af7864c5881.zip |
add getin & get out++++
-rw-r--r-- | src/CuTNetLib/cuMisc.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/CuTNetLib/cuMisc.h b/src/CuTNetLib/cuMisc.h index 207b210..5fbcf9d 100644 --- a/src/CuTNetLib/cuMisc.h +++ b/src/CuTNetLib/cuMisc.h @@ -331,6 +331,13 @@ namespace TNet { ErrorInputVec[pos]=&rErrorInput; } + void CuMatrix<BaseFloat>& GetOutput(int pos=0) + { + if (pos>=0 && pos<size) + return *OutputVec[pos]; + return *OutputVec[0]; + } + void Propagate() { if (NULL == mpInput) Error("mpInput is NULL"); @@ -434,6 +441,13 @@ namespace TNet { InputVec[pos]=&rInput; } + const CuMatrix<BaseFloat>& GetErrorOutput(int pos=0) + { + if (pos>=0 && pos<size) + return *ErrorOutputVec[i]; + return *ErrorOutputVec[0]; + } + void Propagate() { int loc=0; |