This template implements threshold activation function used in neural networks.
You can find more information in comments below. Overrided methods can be found in corresponding base class.
// Return either "ifless_value" or "ifgreater_value" depending whether value if less then "threshold" or otherwise
template<class TYPE>
class TThreshold : public IActivator<TYPE>
{
public:
TThreshold(const TYPE threshold, const TYPE ifless_value, const TYPE ifgreater_value);
TYPE Calculate(const TYPE value) override;
TYPE Derivative(const TYPE value) override;
};
Namespace: | nitisa::ai::activators |
Include: | Nitisa/Modules/AI/Activators.h |