def test_back_tanh():
    l1 = layer.Tanh()
    x = np.random.randn(100, 5)
    dldy = np.random.randn(100, 5)
    dldx = l1.backward(dldy, np.tanh(x), optim)
    assert (dldx.shape == (100, 5))
def test_back_tanh():
    l1 = layer.Tanh()
    x = np.random.randn(100, 5)
    dldy = np.random.randn(100, 5)
    dldx = l1.backward(dldy, np.tanh(x), optim)
    assert (dldx.shape == (100, 5))