mlonmcu.flow.tflm.backend package

Submodules

mlonmcu.flow.tflm.backend.backend module

class mlonmcu.flow.tflm.backend.backend.TFLMBackend(features=None, config=None)[source]

Bases: Backend

DEFAULTS = {}
FEATURES = {}
REQUIRED = {}
load_model(model, input_shapes=None, output_shapes=None, input_types=None, output_types=None)[source]
name = None
registry = {'tflmc': <class 'mlonmcu.flow.tflm.backend.tflmc.TFLMCBackend'>, 'tflmi': <class 'mlonmcu.flow.tflm.backend.tflmi.TFLMIBackend'>}

mlonmcu.flow.tflm.backend.tflmc module

class mlonmcu.flow.tflm.backend.tflmc.TFLMCBackend(features=None, config=None)[source]

Bases: TFLMBackend

DEFAULTS = {'custom_ops': [], 'debug_arena': False, 'print_outputs': False, 'registrations': {}}
FEATURES = {'debug_arena'}
REQUIRED = {'tflmc.exe'}
generate() Tuple[dict, dict][source]
generate_header()[source]
name = 'tflmc'
property print_outputs

mlonmcu.flow.tflm.backend.tflmi module

class mlonmcu.flow.tflm.backend.tflmi.TFLMIBackend(features=None, config=None)[source]

Bases: TFLMBackend

DEFAULTS = {'arena_size': 1048576, 'custom_ops': [], 'debug_arena': False, 'legacy': False, 'ops': [], 'ops_resolver': 'mutable', 'registrations': {}, 'reporter': False}
FEATURES = {'debug_arena'}
property arena_size
property custom_ops
property debug_arena
generate() Tuple[dict, dict][source]
property legacy
name = 'tflmi'
property ops
property ops_resolver
property registrations
property reporter
class mlonmcu.flow.tflm.backend.tflmi.TFLMICodegen[source]

Bases: object

generate_header(prefix='model')[source]
generate_wrapper(model, prefix='model', header=True, legacy=False, debug_arena=False, arena_size=None, ops=None, custom_ops=None, registrations=None, ops_resolver=None, reporter=True)[source]
makeCustomOpPrototypes(custom_ops)[source]
make_op_registrations(ops, custom_ops, reporter=True)[source]
mlonmcu.flow.tflm.backend.tflmi.make_hex_array(data)[source]

Module contents

class mlonmcu.flow.tflm.backend.TFLMBackend(features=None, config=None)[source]

Bases: Backend

DEFAULTS = {}
FEATURES = {}
REQUIRED = {}
load_model(model, input_shapes=None, output_shapes=None, input_types=None, output_types=None)[source]
name = None
registry = {'tflmc': <class 'mlonmcu.flow.tflm.backend.tflmc.TFLMCBackend'>, 'tflmi': <class 'mlonmcu.flow.tflm.backend.tflmi.TFLMIBackend'>}
class mlonmcu.flow.tflm.backend.TFLMCBackend(features=None, config=None)[source]

Bases: TFLMBackend

DEFAULTS = {'custom_ops': [], 'debug_arena': False, 'print_outputs': False, 'registrations': {}}
FEATURES = {'debug_arena'}
REQUIRED = {'tflmc.exe'}
generate() Tuple[dict, dict][source]
generate_header()[source]
name = 'tflmc'
property print_outputs
class mlonmcu.flow.tflm.backend.TFLMIBackend(features=None, config=None)[source]

Bases: TFLMBackend

DEFAULTS = {'arena_size': 1048576, 'custom_ops': [], 'debug_arena': False, 'legacy': False, 'ops': [], 'ops_resolver': 'mutable', 'registrations': {}, 'reporter': False}
FEATURES = {'debug_arena'}
property arena_size
property custom_ops
property debug_arena
generate() Tuple[dict, dict][source]
property legacy
name = 'tflmi'
property ops
property ops_resolver
property registrations
property reporter