Top

tflite.RNNOptions module

# automatically generated by the FlatBuffers compiler, do not modify

# namespace: tflite

import flatbuffers

class RNNOptions(object):
    __slots__ = ['_tab']

    @classmethod
    def GetRootAsRNNOptions(cls, buf, offset):
        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
        x = RNNOptions()
        x.Init(buf, n + offset)
        return x

    # RNNOptions
    def Init(self, buf, pos):
        self._tab = flatbuffers.table.Table(buf, pos)

    # RNNOptions
    def FusedActivationFunction(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
        return 0

    # RNNOptions
    def AsymmetricQuantizeInputs(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
        return False

def RNNOptionsStart(builder): builder.StartObject(2)
def RNNOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0)
def RNNOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(1, asymmetricQuantizeInputs, 0)
def RNNOptionsEnd(builder): return builder.EndObject()

Functions

def RNNOptionsAddAsymmetricQuantizeInputs(

builder, asymmetricQuantizeInputs)

def RNNOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(1, asymmetricQuantizeInputs, 0)

def RNNOptionsAddFusedActivationFunction(

builder, fusedActivationFunction)

def RNNOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0)

def RNNOptionsEnd(

builder)

def RNNOptionsEnd(builder): return builder.EndObject()

def RNNOptionsStart(

builder)

def RNNOptionsStart(builder): builder.StartObject(2)

Classes

class RNNOptions

class RNNOptions(object):
    __slots__ = ['_tab']

    @classmethod
    def GetRootAsRNNOptions(cls, buf, offset):
        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
        x = RNNOptions()
        x.Init(buf, n + offset)
        return x

    # RNNOptions
    def Init(self, buf, pos):
        self._tab = flatbuffers.table.Table(buf, pos)

    # RNNOptions
    def FusedActivationFunction(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
        return 0

    # RNNOptions
    def AsymmetricQuantizeInputs(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
        return False

Ancestors (in MRO)

Static methods

def AsymmetricQuantizeInputs(

self)

def AsymmetricQuantizeInputs(self):
    o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
    if o != 0:
        return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
    return False

def FusedActivationFunction(

self)

def FusedActivationFunction(self):
    o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
    if o != 0:
        return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
    return 0

def Init(

self, buf, pos)

def Init(self, buf, pos):
    self._tab = flatbuffers.table.Table(buf, pos)

Methods

def GetRootAsRNNOptions(

cls, buf, offset)

@classmethod
def GetRootAsRNNOptions(cls, buf, offset):
    n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
    x = RNNOptions()
    x.Init(buf, n + offset)
    return x