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

Method setActivationFunctionWithName

src/Layer.cpp:28–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28void Layer::setActivationFunctionWithName(std::string name) {
29 std::map<std::string, ActivationFunction> nameMap = getActivationFunctionNameMap();
30 std::map<std::string, ActivationFunction>::iterator nameIterator = nameMap.find(name);
31 if(nameIterator != nameMap.end()) {
32 activationFunction = getActivationFunctionNameMap()[name];
33 } else {
34 std::cout << "The activation function \"" << name << "\" does not exist! Throwing error!\n";
35 throw 1;
36 }
37}
38
39std::string Layer::getActivationFunctionName() {
40 std::map<std::string, ActivationFunction> nameMap = getActivationFunctionNameMap();

Callers 2

NeuralNetMethod · 0.80

Calls 2

findMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected