Update unittests to reflect recent changes
This commit is contained in:
parent
b06ded683d
commit
269eb8ba25
@ -52,7 +52,7 @@ class TestActivations(unittest.TestCase):
|
|||||||
self.assertIsNone(mismatch)
|
self.assertIsNone(mismatch)
|
||||||
|
|
||||||
def test_sigmoid_beta1(self):
|
def test_sigmoid_beta1(self):
|
||||||
actual = activations.sigmoid_beta(self.x, beta=torch.tensor(1))
|
actual = activations.sigmoid_beta(self.x, beta=1.0)
|
||||||
desired = torch.sigmoid(self.x)
|
desired = torch.sigmoid(self.x)
|
||||||
mismatch = np.testing.assert_array_almost_equal(actual,
|
mismatch = np.testing.assert_array_almost_equal(actual,
|
||||||
desired,
|
desired,
|
||||||
@ -60,7 +60,7 @@ class TestActivations(unittest.TestCase):
|
|||||||
self.assertIsNone(mismatch)
|
self.assertIsNone(mismatch)
|
||||||
|
|
||||||
def test_swish_beta1(self):
|
def test_swish_beta1(self):
|
||||||
actual = activations.swish_beta(self.x, beta=torch.tensor(1))
|
actual = activations.swish_beta(self.x, beta=1.0)
|
||||||
desired = self.x * torch.sigmoid(self.x)
|
desired = self.x * torch.sigmoid(self.x)
|
||||||
mismatch = np.testing.assert_array_almost_equal(actual,
|
mismatch = np.testing.assert_array_almost_equal(actual,
|
||||||
desired,
|
desired,
|
||||||
|
Loading…
Reference in New Issue
Block a user