I’m designing a neural network and one part of it’s a selector: depending of one value p between 0 and 1 choose between A or B.
To do so I was planning to use a natural generalization of the sigmoid function that just multiplies the input by a scalar k, that is,
Unfortunately I haven’t found something like that in the API and I was wondering if there is any reason for that? I was about to post an issue in github but I’ve decided to ask here first.
Yes, I already have it implemented in my code. But I was curious about why is not already implemented. I mean, the sigmoid is in the API and is also a one-liner.
But playing a bit with your code I think I might found it out. When k grows calculating the gradient may be way too much since it the function resembles the impulse function (with gradient 0 everywhere but in one point that “has infinite” gradient).
Hahaha, I’ve just written down the code without realizing the actual function. Maybe I’m just too tired.
Thanks @agadetsky for preventing more embarrassment