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

Method Infer

src/RaceNet/RaceNet.cpp:22–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20RaceNet::RaceNet() : net(layerParams, learningRate) {}
21
22vector<double> RaceNet::Infer(vector<double> raycastInputs) {
23 // as the sigmoid function never reaches 0.0 nor 1.0
24 // it can be a good idea to consider values greater than 0.9 as 1.0 and values smaller than 0.1 as 0.0
25 // hence the step function.
26 Matrix<double> resultMatrix = net.computeOutput(raycastInputs);//.applyFunction(stepFunction);
27 std::vector<double> resultVector;
28
29 resultVector.emplace_back(resultMatrix.get(0, 0));
30 resultVector.emplace_back(resultMatrix.get(0, 1));
31 resultVector.emplace_back(resultMatrix.get(0, 2));
32 //resultVector.emplace_back(resultMatrix.get(0, 3));
33
34 return resultVector;
35}

Callers 1

simulateMethod · 0.80

Calls 2

computeOutputMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected