| 26 | } |
| 27 | |
| 28 | void 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 | |
| 39 | std::string Layer::getActivationFunctionName() { |
| 40 | std::map<std::string, ActivationFunction> nameMap = getActivationFunctionNameMap(); |
no test coverage detected