From 7be7165ca5168d768a08841658c805dd1bda49c7 Mon Sep 17 00:00:00 2001 From: TatWai Chong Date: Tue, 10 May 2022 17:26:20 -0700 Subject: Align the serialization schema with TOSA 0.24.0 specification The operators are pool, conv, reshape, slice, transpose, and table. Signed-off-by: TatWai Chong Change-Id: I425ab407e699159f75834f31ad2d48e206c71749 --- python/tosa/TableAttribute.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'python/tosa/TableAttribute.py') diff --git a/python/tosa/TableAttribute.py b/python/tosa/TableAttribute.py index 87990c5..6fd719f 100644 --- a/python/tosa/TableAttribute.py +++ b/python/tosa/TableAttribute.py @@ -33,14 +33,14 @@ class TableAttribute(object): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) if o != 0: a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return self._tab.Get(flatbuffers.number_types.Int16Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 2)) return 0 # TableAttribute def TableAsNumpy(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) + return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int16Flags, o) return 0 # TableAttribute @@ -63,7 +63,7 @@ def AddTable(builder, table): builder.PrependUOffsetTRelativeSlot(0, flatbuffers def TableAttributeAddTable(builder, table): """This method is deprecated. Please switch to AddTable.""" return AddTable(builder, table) -def StartTableVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def StartTableVector(builder, numElems): return builder.StartVector(2, numElems, 2) def TableAttributeStartTableVector(builder, numElems): """This method is deprecated. Please switch to Start.""" return StartTableVector(builder, numElems) -- cgit v1.2.1