Ejemplo n.º 1
0
def test_HardSigmiod(tmpdir):
    shape = (2, 3)
    x = C.input_variable(shape=shape, dtype=np.float32)
    alpha = 1.2
    beta = 2.5
    model = C.hard_sigmoid(x, alpha, beta, 'hardSigmoid')

    data = np.random.rand(*shape).astype(np.float32)
    verify_one_input(model, data, tmpdir, 'HardSigmoid_1')
Ejemplo n.º 2
0
def test_HardSigmiod(tmpdir, dtype):
    with C.default_options(dtype=dtype):
        shape = (2, 3)
        x = C.input_variable(shape=shape, dtype=dtype)
        alpha = 1.2
        beta = 2.5
        model = C.hard_sigmoid(x, alpha, beta, 'hardSigmoid')

        data = np.random.rand(*shape).astype(dtype)
        verify_one_input(model, data, tmpdir, 'HardSigmoid_1')
Ejemplo n.º 3
0
def test_HardSigmiod(tmpdir, dtype):
    with C.default_options(dtype = dtype):
        shape = (2,3)
        x = C.input_variable(shape=shape, dtype=dtype)
        alpha = 1.2
        beta = 2.5
        model = C.hard_sigmoid(x, alpha, beta, 'hardSigmoid')

        data = np.random.rand(*shape).astype(dtype)
        verify_one_input(model, data, tmpdir, 'HardSigmoid_1')