[shark] 07/58: fixed issue #35

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Wed Mar 16 10:05:27 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository shark.

commit 4775a2aa87d92cfcd5372ff9a1a81f147b1bbc04
Author: Oswin Krause <oswin.krause at di.ku.dk>
Date:   Tue Jan 19 14:21:45 2016 +0100

    fixed issue #35
---
 src/Models/RNNet.cpp | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/Models/RNNet.cpp b/src/Models/RNNet.cpp
index af9a381..8c52982 100644
--- a/src/Models/RNNet.cpp
+++ b/src/Models/RNNet.cpp
@@ -39,14 +39,14 @@ void RNNet::eval(BatchInputType const& patterns, BatchOutputType& outputs, State
 	InternalState& s = state.toState<InternalState>();
 	std::size_t warmUpLength=m_warmUpSequence.size();
 	std::size_t numUnits = mpe_structure->numberOfUnits();
-	s.timeActivation.resize(size(patterns));
-	outputs.resize(size(patterns));
+	s.timeActivation.resize(patterns.size());
+	outputs.resize(patterns.size());
 
 	//calculation of the sequences
-	for(std::size_t b = 0; b != size(patterns);++b){
-		std::size_t sequenceLength=size(get(patterns,b))+warmUpLength+1;
+	for(std::size_t b = 0; b != patterns.size();++b){
+		std::size_t sequenceLength = patterns[b].size()+warmUpLength+1;
 		s.timeActivation[b].resize(sequenceLength,RealVector(numUnits));
-		outputs[b].resize(size(get(patterns,b)),RealVector(numUnits));
+		outputs[b].resize(patterns[b].size(),RealVector(numUnits));
 		Sequence& sequence = s.timeActivation[b];
 		sequence[0].clear();
 		for (std::size_t t = 1; t < sequenceLength;t++){
@@ -90,9 +90,9 @@ void RNNet::weightedParameterDerivative(
 	std::size_t numUnits = mpe_structure->numberOfUnits();
 	std::size_t numNeurons = mpe_structure->numberOfNeurons();
 	std::size_t warmUpLength=m_warmUpSequence.size();
-	for(std::size_t b = 0; b != size(patterns); ++b){
+	for(std::size_t b = 0; b != patterns.size(); ++b){
 		Sequence const& sequence = s.timeActivation[b];
-		std::size_t sequenceLength = size(s.timeActivation[b]);
+		std::size_t sequenceLength = s.timeActivation[b].size();
 		RealMatrix errorDerivative(sequenceLength,numNeurons);
 		errorDerivative.clear();
 		//copy errors

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/shark.git



More information about the debian-science-commits mailing list