Anonymous avatar Anonymous committed 1f551fc

Divided the code execution in two different stages: training and prediction

Comments (0)

Files changed (1)

tools/SpeciesConnector/SpeciesConnector.cpp

 		DataZero.resize( vecDataIntZero.size( ) );
 		for( i = 0; i < vecDataIntZero.size( ); ++i ){
 			DataZero[ i ] = new CDataPair( );
-			if( !( DataZero[ i ]->Open( vecDataIntZero[ i ].c_str( ), false, !!sArgs.memmap_flag ) ||
-				DataZero[ i ]->Open( vecDataIntZero[ i ].c_str( ), true, !!sArgs.memmap_flag ) ) ){
+			if( !( DataZero[ i ]->Open( vecDataIntZero[ i ].c_str( ), true, !!sArgs.memmap_flag ) ) ){
 					cerr << "Could not open:" << vecDataIntZero[ i ] << endl;
 					return 1;}}
-		
+								
 		vector<CDataPair*>			DataOne;
 		DataOne.resize( vecDataIntOne.size( ) );
 		for( i = 0; i < vecDataIntOne.size( ); ++i ){
 			DataOne[ i ] = new CDataPair( );
-			if( !( DataOne[ i ]->Open( vecDataIntOne[ i ].c_str( ), false, !!sArgs.memmap_flag ) ||
-				DataOne[ i ]->Open( vecDataIntOne[ i ].c_str( ), true, !!sArgs.memmap_flag ) ) ){
+			if( !( DataOne[ i ]->Open( vecDataIntOne[ i ].c_str( ), true, !!sArgs.memmap_flag ) ) ){
 					cerr << "Could not open:" << vecDataIntOne[ i ] << endl;
 					return 1;}}
 
 		VecLearnedNames.resize( JointDim );
 		VecLearnedNames[ 0 ].resize( JointDim );
 		VecLearnedNames[ 1 ].resize( JointDim );
-		VecLearnedNames[ 0 ][ 0 ] = "Learned00";
-		VecLearnedNames[ 0 ][ 1 ] = "Learned01";
-		VecLearnedNames[ 1 ][ 0 ] = "Learned10";
-		VecLearnedNames[ 1 ][ 1 ] = "Learned11";
+		VecLearnedNames[ 0 ][ 0 ] = "/Learned00";
+		VecLearnedNames[ 0 ][ 1 ] = "/Learned01";
+		VecLearnedNames[ 1 ][ 0 ] = "/Learned10";
+		VecLearnedNames[ 1 ][ 1 ] = "/Learned11";
 
 		vec4OSpGSp.resize( vecstrxInputs.size( ) );
 		for( iDatOne = 0; iDatOne < vecstrxInputs.size( ); ++iDatOne ) {
 		for( j = 0; j < JointDim; ++j ){
 			CDataPair		DataF;
 			string			JointFile = ( string )sArgs.jdirectory_arg + VecLearnedNames[ i ][ j ] + c_acDab; 
-			if( !( DataF.Open( JointFile.c_str( ), false, !!sArgs.memmap_flag ) ||
-					DataF.Open( JointFile.c_str( ), true, !!sArgs.memmap_flag ) ) ){
+			if( !( DataF.Open( JointFile.c_str( ), true, !!sArgs.memmap_flag ) ) ){
 						cerr << "Could not open:" << JointFile << endl;
 						return 1;}
-
+			
 			vector<size_t>	veciSpecies;
 			veciSpecies.resize( vecstrxInputs.size( ) );
 			for( k = 0; k < vecstrxInputs.size( ); ++k )
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.