Module tflite.StridedSliceOptions
Expand source code
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: tflite
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class StridedSliceOptions(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = StridedSliceOptions()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsStridedSliceOptions(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
@classmethod
def StridedSliceOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
# StridedSliceOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# StridedSliceOptions
def BeginMask(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# StridedSliceOptions
def EndMask(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# StridedSliceOptions
def EllipsisMask(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# StridedSliceOptions
def NewAxisMask(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# StridedSliceOptions
def ShrinkAxisMask(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
def StridedSliceOptionsStart(builder): builder.StartObject(5)
def Start(builder):
return StridedSliceOptionsStart(builder)
def StridedSliceOptionsAddBeginMask(builder, beginMask): builder.PrependInt32Slot(0, beginMask, 0)
def AddBeginMask(builder, beginMask):
return StridedSliceOptionsAddBeginMask(builder, beginMask)
def StridedSliceOptionsAddEndMask(builder, endMask): builder.PrependInt32Slot(1, endMask, 0)
def AddEndMask(builder, endMask):
return StridedSliceOptionsAddEndMask(builder, endMask)
def StridedSliceOptionsAddEllipsisMask(builder, ellipsisMask): builder.PrependInt32Slot(2, ellipsisMask, 0)
def AddEllipsisMask(builder, ellipsisMask):
return StridedSliceOptionsAddEllipsisMask(builder, ellipsisMask)
def StridedSliceOptionsAddNewAxisMask(builder, newAxisMask): builder.PrependInt32Slot(3, newAxisMask, 0)
def AddNewAxisMask(builder, newAxisMask):
return StridedSliceOptionsAddNewAxisMask(builder, newAxisMask)
def StridedSliceOptionsAddShrinkAxisMask(builder, shrinkAxisMask): builder.PrependInt32Slot(4, shrinkAxisMask, 0)
def AddShrinkAxisMask(builder, shrinkAxisMask):
return StridedSliceOptionsAddShrinkAxisMask(builder, shrinkAxisMask)
def StridedSliceOptionsEnd(builder): return builder.EndObject()
def End(builder):
return StridedSliceOptionsEnd(builder)
Functions
def AddBeginMask(builder, beginMask)
-
Expand source code
def AddBeginMask(builder, beginMask): return StridedSliceOptionsAddBeginMask(builder, beginMask)
def AddEllipsisMask(builder, ellipsisMask)
-
Expand source code
def AddEllipsisMask(builder, ellipsisMask): return StridedSliceOptionsAddEllipsisMask(builder, ellipsisMask)
def AddEndMask(builder, endMask)
-
Expand source code
def AddEndMask(builder, endMask): return StridedSliceOptionsAddEndMask(builder, endMask)
def AddNewAxisMask(builder, newAxisMask)
-
Expand source code
def AddNewAxisMask(builder, newAxisMask): return StridedSliceOptionsAddNewAxisMask(builder, newAxisMask)
def AddShrinkAxisMask(builder, shrinkAxisMask)
-
Expand source code
def AddShrinkAxisMask(builder, shrinkAxisMask): return StridedSliceOptionsAddShrinkAxisMask(builder, shrinkAxisMask)
def End(builder)
-
Expand source code
def End(builder): return StridedSliceOptionsEnd(builder)
def Start(builder)
-
Expand source code
def Start(builder): return StridedSliceOptionsStart(builder)
def StridedSliceOptionsAddBeginMask(builder, beginMask)
-
Expand source code
def StridedSliceOptionsAddBeginMask(builder, beginMask): builder.PrependInt32Slot(0, beginMask, 0)
def StridedSliceOptionsAddEllipsisMask(builder, ellipsisMask)
-
Expand source code
def StridedSliceOptionsAddEllipsisMask(builder, ellipsisMask): builder.PrependInt32Slot(2, ellipsisMask, 0)
def StridedSliceOptionsAddEndMask(builder, endMask)
-
Expand source code
def StridedSliceOptionsAddEndMask(builder, endMask): builder.PrependInt32Slot(1, endMask, 0)
def StridedSliceOptionsAddNewAxisMask(builder, newAxisMask)
-
Expand source code
def StridedSliceOptionsAddNewAxisMask(builder, newAxisMask): builder.PrependInt32Slot(3, newAxisMask, 0)
def StridedSliceOptionsAddShrinkAxisMask(builder, shrinkAxisMask)
-
Expand source code
def StridedSliceOptionsAddShrinkAxisMask(builder, shrinkAxisMask): builder.PrependInt32Slot(4, shrinkAxisMask, 0)
def StridedSliceOptionsEnd(builder)
-
Expand source code
def StridedSliceOptionsEnd(builder): return builder.EndObject()
def StridedSliceOptionsStart(builder)
-
Expand source code
def StridedSliceOptionsStart(builder): builder.StartObject(5)
Classes
class StridedSliceOptions
-
Expand source code
class StridedSliceOptions(object): __slots__ = ['_tab'] @classmethod def GetRootAs(cls, buf, offset=0): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) x = StridedSliceOptions() x.Init(buf, n + offset) return x @classmethod def GetRootAsStridedSliceOptions(cls, buf, offset=0): """This method is deprecated. Please switch to GetRootAs.""" return cls.GetRootAs(buf, offset) @classmethod def StridedSliceOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False): return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed) # StridedSliceOptions def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos) # StridedSliceOptions def BeginMask(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) if o != 0: return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 # StridedSliceOptions def EndMask(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 # StridedSliceOptions def EllipsisMask(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 # StridedSliceOptions def NewAxisMask(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) if o != 0: return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 # StridedSliceOptions def ShrinkAxisMask(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) if o != 0: return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0
Static methods
def GetRootAs(buf, offset=0)
-
Expand source code
@classmethod def GetRootAs(cls, buf, offset=0): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) x = StridedSliceOptions() x.Init(buf, n + offset) return x
def GetRootAsStridedSliceOptions(buf, offset=0)
-
This method is deprecated. Please switch to GetRootAs.
Expand source code
@classmethod def GetRootAsStridedSliceOptions(cls, buf, offset=0): """This method is deprecated. Please switch to GetRootAs.""" return cls.GetRootAs(buf, offset)
def StridedSliceOptionsBufferHasIdentifier(buf, offset, size_prefixed=False)
-
Expand source code
@classmethod def StridedSliceOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False): return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
Methods
def BeginMask(self)
-
Expand source code
def BeginMask(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) if o != 0: return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0
def EllipsisMask(self)
-
Expand source code
def EllipsisMask(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0
def EndMask(self)
-
Expand source code
def EndMask(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0
def Init(self, buf, pos)
-
Expand source code
def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos)
def NewAxisMask(self)
-
Expand source code
def NewAxisMask(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) if o != 0: return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0
def ShrinkAxisMask(self)
-
Expand source code
def ShrinkAxisMask(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) if o != 0: return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0