Stable Sigmoid op (#59)

* 🔨 Added stable sigmoid

*  added sigmoid test

* 🔧 suppressed overflow warning

* 🔧 clean up
This commit is contained in:
NeuralLink
2020-11-06 11:27:50 +05:30
committed by GitHub
parent cc852efa64
commit cc605da36d
2 changed files with 5 additions and 2 deletions

View File

@@ -53,6 +53,8 @@ class TestOps(unittest.TestCase):
helper_test_op([(45,65)], lambda x: x.sqrt(), Tensor.sqrt, gpu=self.gpu)
def test_relu(self):
helper_test_op([(45,65)], lambda x: x.relu(), Tensor.relu, gpu=self.gpu)
def test_sigmoid(self):
helper_test_op([(45,65)], lambda x: x.sigmoid(), Tensor.sigmoid, gpu=self.gpu)
def test_dot(self):
helper_test_op([(45,65), (65,100)], lambda x,y: x.matmul(y), Tensor.dot, atol=1e-5, gpu=self.gpu)