1 # automatically generated by the FlatBuffers compiler, do not modify
3 # namespace: onert_tflite
8 class SequenceRNNOptions(object):
12 def GetRootAsSequenceRNNOptions(cls, buf, offset):
13 n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
14 x = SequenceRNNOptions()
15 x.Init(buf, n + offset)
19 def Init(self, buf, pos):
20 self._tab = flatbuffers.table.Table(buf, pos)
24 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
27 self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
31 def FusedActivationFunction(self):
32 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
34 return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
38 def AsymmetricQuantizeInputs(self):
39 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
42 self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
46 def SequenceRNNOptionsStart(builder):
47 builder.StartObject(3)
50 def SequenceRNNOptionsAddTimeMajor(builder, timeMajor):
51 builder.PrependBoolSlot(0, timeMajor, 0)
54 def SequenceRNNOptionsAddFusedActivationFunction(builder, fusedActivationFunction):
55 builder.PrependInt8Slot(1, fusedActivationFunction, 0)
58 def SequenceRNNOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs):
59 builder.PrependBoolSlot(2, asymmetricQuantizeInputs, 0)
62 def SequenceRNNOptionsEnd(builder):
63 return builder.EndObject()