Commits

Anonymous committed 1f551fc

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

  • Participants
  • Parent commits 0644ebc

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 )