Skip to content

AfSigmoidBias activation function seems wrong #4

@JoostHuizinga

Description

@JoostHuizinga

The activation function in AfSigmoidBias, defined in af.hpp, seems wrong. As you can see below, in the current implementation, only the bias (trait<P>::single_value(this->_params) is multiplied by lambda.

return 1.0 / (exp(-p + trait<P>::single_value(this->_params) * lambda) + 1);

However, I would assume that the sum of (-p + bias) should be multiplied by lambda. In code:

return 1.0 / (exp((-p + trait<P>::single_value(this->_params)) * lambda) + 1);

Also, since it is called a bias, shouldn't it be added to p before it becomes negative? In its current form, it seems that the bias would function more like a threshold.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions