-
-
Save cosmic-cortex/3d9b1a287c355413328f7f673250cc8f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
class Sigmoid: | |
def __call__(self, x): | |
return 1 / (1 + np.exp(-x)) | |
def grad(self, x): | |
return self(x) * (1 - self(x)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment