Last active
June 26, 2020 22:53
-
-
Save logancyang/c95ae9249e87c326f408f89a1695130a to your computer and use it in GitHub Desktop.
Revisions
-
logancyang revised this gist
Jun 26, 2020 . 1 changed file with 9 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,10 @@ class Tensor: def __init__(self, data, _parents, _op): ... def sigmoid(self): sigm = 1.0/(1 + np.exp(-self.data)) out = Tensor(sigm, _parents=(self,), _op="σ") def _backward(): self.grad = sigm * (1 - sigm) out._backward = _backward return out -
logancyang created this gist
Jun 26, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ class Tensor: def __init__(self, data, _parents, _op): ... def sigmoid(self): sigm = 1.0/(1 + np.exp(-self.data)) out = Tensor(sigm, _parents=(self,), _op="σ") def _backward(): self.grad = sigm * (1 - sigm) out._backward = _backward return out