Example #1
0
def test_zeros_like_with_device(device):
    t = chainerx.empty((2,), 'float32')
    a = chainerx.zeros_like(t, device)
    b = chainerx.zeros_like(t)
    array_utils.check_device(a, device)
    chainerx.testing.assert_array_equal_ex(a, b)
Example #2
0
def test_zeros_like_with_device(device):
    t = chainerx.empty((2,), 'float32')
    a = chainerx.zeros_like(t, device)
    b = chainerx.zeros_like(t)
    array_utils.check_device(a, device)
    chainerx.testing.assert_array_equal_ex(a, b)