Function SaveOutputs(DataSet&, std::shared_ptr<Dimlp>, int, int, const std::string&)
Defined in File dimlpCommonFun.cpp
Function Documentation
-
void SaveOutputs(DataSet &data, std::shared_ptr<Dimlp> net, int nbOut, int nbWeightLayers, const std::string &outfile)
Saves the outputs of a neural network to a file.
This function performs a forward pass on each data example and writes the network’s outputs to a specified file.
- Parameters:
data – Reference to the dataset containing the examples.
net – Shared pointer to the Dimlp neural network.
nbOut – Number of outputs of the network.
nbWeightLayers – Number of weight layers in the network.
outfile – Name of the file where the outputs will be written.
- Throws:
CannotOpenFileError – If the output file cannot be opened.