Module tflite.StablehloGatherOptions
Functions
def AddCollapsedSliceDims(builder, collapsedSliceDims)
-
Expand source code
def AddCollapsedSliceDims(builder, collapsedSliceDims): StablehloGatherOptionsAddCollapsedSliceDims(builder, collapsedSliceDims)
def AddIndexVectorDim(builder, indexVectorDim)
-
Expand source code
def AddIndexVectorDim(builder, indexVectorDim): StablehloGatherOptionsAddIndexVectorDim(builder, indexVectorDim)
def AddIndicesAreSorted(builder, indicesAreSorted)
-
Expand source code
def AddIndicesAreSorted(builder, indicesAreSorted): StablehloGatherOptionsAddIndicesAreSorted(builder, indicesAreSorted)
def AddOffsetDims(builder, offsetDims)
-
Expand source code
def AddOffsetDims(builder, offsetDims): StablehloGatherOptionsAddOffsetDims(builder, offsetDims)
def AddSliceSizes(builder, sliceSizes)
-
Expand source code
def AddSliceSizes(builder, sliceSizes): StablehloGatherOptionsAddSliceSizes(builder, sliceSizes)
def AddStartIndexMap(builder, startIndexMap)
-
Expand source code
def AddStartIndexMap(builder, startIndexMap): StablehloGatherOptionsAddStartIndexMap(builder, startIndexMap)
def End(builder)
-
Expand source code
def End(builder): return StablehloGatherOptionsEnd(builder)
def StablehloGatherOptionsAddCollapsedSliceDims(builder, collapsedSliceDims)
-
Expand source code
def StablehloGatherOptionsAddCollapsedSliceDims(builder, collapsedSliceDims): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(collapsedSliceDims), 0)
def StablehloGatherOptionsAddIndexVectorDim(builder, indexVectorDim)
-
Expand source code
def StablehloGatherOptionsAddIndexVectorDim(builder, indexVectorDim): builder.PrependInt64Slot(3, indexVectorDim, 0)
def StablehloGatherOptionsAddIndicesAreSorted(builder, indicesAreSorted)
-
Expand source code
def StablehloGatherOptionsAddIndicesAreSorted(builder, indicesAreSorted): builder.PrependBoolSlot(5, indicesAreSorted, 0)
def StablehloGatherOptionsAddOffsetDims(builder, offsetDims)
-
Expand source code
def StablehloGatherOptionsAddOffsetDims(builder, offsetDims): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(offsetDims), 0)
def StablehloGatherOptionsAddSliceSizes(builder, sliceSizes)
-
Expand source code
def StablehloGatherOptionsAddSliceSizes(builder, sliceSizes): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(sliceSizes), 0)
def StablehloGatherOptionsAddStartIndexMap(builder, startIndexMap)
-
Expand source code
def StablehloGatherOptionsAddStartIndexMap(builder, startIndexMap): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(startIndexMap), 0)
def StablehloGatherOptionsEnd(builder)
-
Expand source code
def StablehloGatherOptionsEnd(builder): return builder.EndObject()
def StablehloGatherOptionsStart(builder)
-
Expand source code
def StablehloGatherOptionsStart(builder): builder.StartObject(6)
def StablehloGatherOptionsStartCollapsedSliceDimsVector(builder, numElems)
-
Expand source code
def StablehloGatherOptionsStartCollapsedSliceDimsVector(builder, numElems): return builder.StartVector(8, numElems, 8)
def StablehloGatherOptionsStartOffsetDimsVector(builder, numElems)
-
Expand source code
def StablehloGatherOptionsStartOffsetDimsVector(builder, numElems): return builder.StartVector(8, numElems, 8)
def StablehloGatherOptionsStartSliceSizesVector(builder, numElems)
-
Expand source code
def StablehloGatherOptionsStartSliceSizesVector(builder, numElems): return builder.StartVector(8, numElems, 8)
def StablehloGatherOptionsStartStartIndexMapVector(builder, numElems)
-
Expand source code
def StablehloGatherOptionsStartStartIndexMapVector(builder, numElems): return builder.StartVector(8, numElems, 8)
def Start(builder)
-
Expand source code
def Start(builder): StablehloGatherOptionsStart(builder)
def StartCollapsedSliceDimsVector(builder, numElems)
-
Expand source code
def StartCollapsedSliceDimsVector(builder, numElems): return StablehloGatherOptionsStartCollapsedSliceDimsVector(builder, numElems)
def StartOffsetDimsVector(builder, numElems)
-
Expand source code
def StartOffsetDimsVector(builder, numElems): return StablehloGatherOptionsStartOffsetDimsVector(builder, numElems)
def StartSliceSizesVector(builder, numElems)
-
Expand source code
def StartSliceSizesVector(builder, numElems): return StablehloGatherOptionsStartSliceSizesVector(builder, numElems)
def StartStartIndexMapVector(builder, numElems)
-
Expand source code
def StartStartIndexMapVector(builder, numElems): return StablehloGatherOptionsStartStartIndexMapVector(builder, numElems)
Classes
class StablehloGatherOptions
-
Expand source code
class StablehloGatherOptions(object): __slots__ = ['_tab'] @classmethod def GetRootAs(cls, buf, offset=0): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) x = StablehloGatherOptions() x.Init(buf, n + offset) return x @classmethod def GetRootAsStablehloGatherOptions(cls, buf, offset=0): """This method is deprecated. Please switch to GetRootAs.""" return cls.GetRootAs(buf, offset) @classmethod def StablehloGatherOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False): return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed) # StablehloGatherOptions def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos) # StablehloGatherOptions def OffsetDims(self, j): 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.Int64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) return 0 # StablehloGatherOptions def OffsetDimsAsNumpy(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) if o != 0: return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int64Flags, o) return 0 # StablehloGatherOptions def OffsetDimsLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) if o != 0: return self._tab.VectorLen(o) return 0 # StablehloGatherOptions def OffsetDimsIsNone(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) return o == 0 # StablehloGatherOptions def CollapsedSliceDims(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: a = self._tab.Vector(o) return self._tab.Get(flatbuffers.number_types.Int64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) return 0 # StablehloGatherOptions def CollapsedSliceDimsAsNumpy(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int64Flags, o) return 0 # StablehloGatherOptions def CollapsedSliceDimsLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: return self._tab.VectorLen(o) return 0 # StablehloGatherOptions def CollapsedSliceDimsIsNone(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) return o == 0 # StablehloGatherOptions def StartIndexMap(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: a = self._tab.Vector(o) return self._tab.Get(flatbuffers.number_types.Int64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) return 0 # StablehloGatherOptions def StartIndexMapAsNumpy(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int64Flags, o) return 0 # StablehloGatherOptions def StartIndexMapLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: return self._tab.VectorLen(o) return 0 # StablehloGatherOptions def StartIndexMapIsNone(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) return o == 0 # StablehloGatherOptions def IndexVectorDim(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) if o != 0: return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) return 0 # StablehloGatherOptions def SliceSizes(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) if o != 0: a = self._tab.Vector(o) return self._tab.Get(flatbuffers.number_types.Int64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) return 0 # StablehloGatherOptions def SliceSizesAsNumpy(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) if o != 0: return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int64Flags, o) return 0 # StablehloGatherOptions def SliceSizesLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) if o != 0: return self._tab.VectorLen(o) return 0 # StablehloGatherOptions def SliceSizesIsNone(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) return o == 0 # StablehloGatherOptions def IndicesAreSorted(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) if o != 0: return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False
Static methods
def GetRootAs(buf, offset=0)
def GetRootAsStablehloGatherOptions(buf, offset=0)
-
This method is deprecated. Please switch to GetRootAs.
def StablehloGatherOptionsBufferHasIdentifier(buf, offset, size_prefixed=False)
Methods
def CollapsedSliceDims(self, j)
-
Expand source code
def CollapsedSliceDims(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: a = self._tab.Vector(o) return self._tab.Get(flatbuffers.number_types.Int64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) return 0
def CollapsedSliceDimsAsNumpy(self)
-
Expand source code
def CollapsedSliceDimsAsNumpy(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int64Flags, o) return 0
def CollapsedSliceDimsIsNone(self)
-
Expand source code
def CollapsedSliceDimsIsNone(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) return o == 0
def CollapsedSliceDimsLength(self)
-
Expand source code
def CollapsedSliceDimsLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: return self._tab.VectorLen(o) return 0
def IndexVectorDim(self)
-
Expand source code
def IndexVectorDim(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) if o != 0: return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) return 0
def IndicesAreSorted(self)
-
Expand source code
def IndicesAreSorted(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) if o != 0: return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False
def Init(self, buf, pos)
-
Expand source code
def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos)
def OffsetDims(self, j)
-
Expand source code
def OffsetDims(self, j): 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.Int64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) return 0
def OffsetDimsAsNumpy(self)
-
Expand source code
def OffsetDimsAsNumpy(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) if o != 0: return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int64Flags, o) return 0
def OffsetDimsIsNone(self)
-
Expand source code
def OffsetDimsIsNone(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) return o == 0
def OffsetDimsLength(self)
-
Expand source code
def OffsetDimsLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) if o != 0: return self._tab.VectorLen(o) return 0
def SliceSizes(self, j)
-
Expand source code
def SliceSizes(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) if o != 0: a = self._tab.Vector(o) return self._tab.Get(flatbuffers.number_types.Int64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) return 0
def SliceSizesAsNumpy(self)
-
Expand source code
def SliceSizesAsNumpy(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) if o != 0: return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int64Flags, o) return 0
def SliceSizesIsNone(self)
-
Expand source code
def SliceSizesIsNone(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) return o == 0
def SliceSizesLength(self)
-
Expand source code
def SliceSizesLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) if o != 0: return self._tab.VectorLen(o) return 0
def StartIndexMap(self, j)
-
Expand source code
def StartIndexMap(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: a = self._tab.Vector(o) return self._tab.Get(flatbuffers.number_types.Int64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) return 0
def StartIndexMapAsNumpy(self)
-
Expand source code
def StartIndexMapAsNumpy(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int64Flags, o) return 0
def StartIndexMapIsNone(self)
-
Expand source code
def StartIndexMapIsNone(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) return o == 0
def StartIndexMapLength(self)
-
Expand source code
def StartIndexMapLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: return self._tab.VectorLen(o) return 0