def test_slice_descriptor_default_values(): desc = ann.SliceDescriptor() desc.m_Begin = [1, 2, 3, 4, 5] desc.m_Size = (1, 2, 3, 4) assert [1, 2, 3, 4, 5] == desc.m_Begin assert [1, 2, 3, 4] == desc.m_Size
def test_slice_descriptor_ctor(): desc = ann.SliceDescriptor([1, 2, 3, 4, 5], (1, 2, 3, 4)) assert [1, 2, 3, 4, 5] == desc.m_Begin assert [1, 2, 3, 4] == desc.m_Size
def test_slice_descriptor_default_values(): desc = ann.SliceDescriptor() assert desc.m_TargetWidth == 0 assert desc.m_TargetHeight == 0 assert desc.m_Method == ann.ResizeMethod_NearestNeighbor assert desc.m_DataLayout == ann.DataLayout_NCHW