Exemplo n.º 1
0
def test_axes():
    axes = [C.Axis.default_batch_axis(), C.Axis.default_dynamic_axis()]
    assert tuple(axes) == C.Axis.default_input_variable_dynamic_axes()
    assert sanitize_dynamic_axes(axes) == \
            tuple(reversed(C.Axis.default_input_variable_dynamic_axes()))

    assert (C.Axis.default_dynamic_axis(),) == \
            sanitize_dynamic_axes(C.Axis.default_dynamic_axis())
Exemplo n.º 2
0
def test_axes():
    axes = [C.Axis.default_batch_axis(), C.Axis.default_dynamic_axis()]
    assert tuple(axes) == C.Axis.default_input_variable_dynamic_axes()
    assert sanitize_dynamic_axes(axes) == \
            tuple(reversed(C.Axis.default_input_variable_dynamic_axes()))

    assert (C.Axis.default_dynamic_axis(),) == \
            sanitize_dynamic_axes(C.Axis.default_dynamic_axis())