14 namespace PhysicsTools {
20 const char *str = line.c_str();
23 std::vector<std::string> tokens;
29 const char *
q = std::strchr(p, delim);
48 <<
"mlpfit doesn't support more than one instance."
51 std::vector<std::string> parsed =
split(layout_,
':');
52 if (parsed.size() < 1)
54 <<
"Invalid layout." << std::endl;
56 layout =
new int[parsed.size() + 2];
61 std::istringstream ss(parsed[
i]);
66 <<
"Invalid layout." << std::endl;
70 layout[layers + 1] = (int)nOut;
116 PAT.Npat[0] = (int)size;
134 std::memcpy(&
PAT.vRin[0][row*(nIn + 1) + 1], data,
sizeof(
double) * nIn);
135 std::memcpy(&
PAT.Rans[0][row][0], target,
sizeof(
double) * nOut);
158 <<
"Error opening \"" << file <<
"\"." << std::endl;
164 if (
LoadWeights(const_cast<char*>(file.c_str()), &epoch_) < 0)
166 <<
"Error opening \"" << file <<
"\"." << std::endl;
167 epoch = (
unsigned int)epoch_;
dbl MLP_Epoch(int iepoch, dbl *alpmin, int *Ntest)
int SaveWeights(char *filename, int iepoch)
int MLP_SetNet(int *nl, int *nn)
void MLP_Out_T(type_pat *rrin)
int LoadWeights(char *filename, int *iepoch)
int AllocPatterns(int ifile, int npat, int nin, int nout, int iadd)
char data[epos_bytes_allocation]
volatile std::atomic< bool > shutdown_flag false
int FreePatterns(int ifile)
tuple size
Write out results.