diff options
author | TatWai Chong <tatwai.chong@arm.com> | 2022-05-10 17:26:20 -0700 |
---|---|---|
committer | TatWai Chong <tatwai.chong@arm.com> | 2022-06-07 09:45:49 -0700 |
commit | 7be7165ca5168d768a08841658c805dd1bda49c7 (patch) | |
tree | 757c55dd628dd8e97f7426d822ef116ada791aae /python/tosa/TableAttribute.py | |
parent | 4102773d83e236448130b43b1747621ace00160f (diff) | |
download | serialization_lib-7be7165ca5168d768a08841658c805dd1bda49c7.tar.gz |
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 <tatwai.chong@arm.com>
Change-Id: I425ab407e699159f75834f31ad2d48e206c71749
Diffstat (limited to 'python/tosa/TableAttribute.py')
-rw-r--r-- | python/tosa/TableAttribute.py | 6 |
1 files changed, 3 insertions, 3 deletions
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) |