MCPcopy Create free account
hub / github.com/FidoProject/Fido / getWeights

Method getWeights

src/NeuralNet.cpp:67–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67std::vector<double> NeuralNet::getWeights() {
68 std::vector<double> weights;
69 for(unsigned int a = 0; a < net.size(); a++) {
70 for(unsigned int b = 0; b < net[a].neurons.size(); b++) {
71 for(unsigned int c = 0; c < net[a].neurons[b].weights.size(); c++) {
72 weights.push_back(net[a].neurons[b].weights[c]);
73 }
74 }
75 }
76 return weights;
77}
78
79std::vector< std::vector< std::vector<double> > > NeuralNet::getWeights3D() {
80 std::vector< std::vector< std::vector<double> > > weights;

Callers 3

crossoverMethod · 0.80
mutateMethod · 0.80
network.cppFile · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected