Beispiel #1
0
def test_init_zero():
    tensor = init.initializer(init.Zero(), [2, 2], ms.float32)
    _check_value(tensor, 0, 0)
Beispiel #2
0
def test_init_zero_default_dtype():
    tensor = init.initializer(init.Zero(), [2, 2])
    assert tensor.dtype() == ms.float32
    _check_value(tensor, 0, 0)