mltk.core.TfliteTransposeConvLayer

class TfliteTransposeConvLayer[source]

TRANSPOSE_CONV operation TfliteLayer

Properties

bias_data

Bias tensor data (None if no bias used)

bias_tensor

Bias tensor data (None if no bias used)

filters

The number of filters

filters_data

Filters tensor data

filters_tensor

Filters tensor data

index

Index of this layer in the model

input_data

Input tensor data

input_tensor

Input tensor data

inputs

List of layer input tensor(s)

kernel_size

Filters kernel size has height x width

metadata

Additional key/value data to associated with layer

model

Reference to associated TfliteModel

n_inputs

Return the number of inputs

n_outputs

Return the number of outputs

name

op<index>-<OpCodeStr>

opcode

OpCode numeric value

opcode_str

OpCode as a string

options

Layer-specific options/config

output_data

Output tensor data

output_tensor

Output tensor data

outputs

List of layer output tensor(s)

padding

Kernel padding

params

Calculated layer parameters

strides

Kernel stride height x width

use_bias

Return if the layer uses a bias

Methods

__init__

from_flatbuffer

Instantiate a TfliteLayer from then given TfliteModel flatbuffer operation

get_input_data

Get layer input tensor as np.ndarray

get_input_tensor

Get layer input tensor as TfliteTensor

get_output_data

Layer output tensor as np.ndarray

get_output_tensor

Layer output tensor as TfliteTensor

__init__(fb_operation, **kwargs)[source]
Parameters:

fb_operation (OperatorT) –

property options: TfliteTransposeConvLayerOptions

Layer-specific options/config

Return type:

TfliteTransposeConvLayerOptions

property filters: int

The number of filters

Return type:

int

property kernel_size: Tuple[int, int]

Filters kernel size has height x width

Return type:

Tuple[int, int]

property strides: Tuple[int, int]

Kernel stride height x width

Return type:

Tuple[int, int]

property padding: str

Kernel padding

Return type:

str

property use_bias: bool

Return if the layer uses a bias

Return type:

bool

property input_tensor: TfliteTensor

Input tensor data

Return type:

TfliteTensor

property input_data: ndarray

Input tensor data

Return type:

ndarray

property filters_tensor: TfliteTensor

Filters tensor data

Return type:

TfliteTensor

property filters_data: ndarray

Filters tensor data

Return type:

ndarray

property bias_tensor: TfliteTensor

Bias tensor data (None if no bias used)

Return type:

TfliteTensor

property bias_data: ndarray

Bias tensor data (None if no bias used)

Return type:

ndarray

property output_tensor: TfliteTensor

Output tensor data

Return type:

TfliteTensor

property output_data: ndarray

Output tensor data

Return type:

ndarray

property params: TfliteTransposeConvParams

Calculated layer parameters

Return type:

TfliteTransposeConvParams

static from_flatbuffer(index, model, fb_operation)

Instantiate a TfliteLayer from then given TfliteModel flatbuffer operation

Return type:

TfliteLayer

Parameters:
  • index (int) –

  • model (TfliteModel) –

  • fb_operation (OperatorT) –

get_input_data(index=0)

Get layer input tensor as np.ndarray

Return type:

ndarray

get_input_tensor(index=0)

Get layer input tensor as TfliteTensor

Return type:

TfliteTensor

get_output_data(index=0)

Layer output tensor as np.ndarray

Return type:

ndarray

get_output_tensor(index=0)

Layer output tensor as TfliteTensor

Return type:

TfliteTensor

property index: int

Index of this layer in the model

Return type:

int

property inputs: List[TfliteTensor]

List of layer input tensor(s)

Return type:

List[TfliteTensor]

property metadata: Dict[str, object]

Additional key/value data to associated with layer

NOTE: This information is generated by the framework/Python scripts

(i.e. The information does NOT come from the .tflite model)

Return type:

Dict[str, object]

property model: TfliteModel

Reference to associated TfliteModel

Return type:

TypeVar(TfliteModel)

property n_inputs: int

Return the number of inputs

Return type:

int

property n_outputs: int

Return the number of outputs

Return type:

int

property name: str

op<index>-<OpCodeStr>

Type:

Name of current layer as

Return type:

str

property opcode: BuiltinOperator

OpCode numeric value

Return type:

BuiltinOperator

property opcode_str: str

OpCode as a string

Return type:

str

property outputs: List[TfliteTensor]

List of layer output tensor(s)

Return type:

List[TfliteTensor]