MCPcopy Create free account
hub / github.com/RootHarold/Lycoris / compute

Method compute

LycorisNet/sources/lycoris.cpp:200–217  ·  view source on GitHub ↗

Forward Computing of the best individual.

Source from the content-addressed store, hash-verified

198
199 // Forward Computing of the best individual.
200 std::vector<float> Lycoris::compute(std::vector<float> &input) {
201 if (input.size() != inputNum) {
202 std::cout << "The input data is not proper!" << std::endl;
203 exit(6);
204 }
205
206 checkFirstRun();
207
208 float output[outputNum];
209 best->forward(input, output);
210
211 if (args->mode == "classify") {
212 LycorisUtils::softmax(output, outputNum);
213 }
214
215 std::vector<float> ret(output, output + outputNum);
216 return ret;
217 }
218
219 // Parallel forward Computing of the best individual.
220 std::vector<std::vector<float> > Lycoris::computeBatch(std::vector<std::vector<float> > &input) {

Callers

nothing calls this directly

Calls 1

forwardMethod · 0.80

Tested by

no test coverage detected