MCPcopy Create free account
hub / github.com/OpenNFS/OpenNFS / saveNetworkParams

Method saveNetworkParams

src/RaceNet/Network.cpp:80–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void Network::saveNetworkParams(const char *filepath) {
81 std::ofstream out(filepath);
82
83 out << hiddenLayersCount << std::endl;
84 out << learningRate << std::endl;
85
86 for (Matrix<double> m : W) {
87 printToFile(m, out);
88 }
89
90 for (Matrix<double> m : B) {
91 printToFile(m, out);
92 }
93
94 out.close();
95}
96
97void Network::loadNetworkParams(const char *filepath) {
98 std::ifstream in(filepath);

Callers 1

TrainingGroundMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected