Beispiel #1
0
def collect_extenders(path: str):
    """
    A function to registrate all MO IR Reader extenders
    :param path: Path to Model Optimizer folder
    :return:
    """
    import_by_path(os.path.join(path, 'mo', 'utils', 'ir_reader', 'extenders'),
                   ['mo', 'utils', 'ir_reader', 'extenders'],
                   'openvino.tools.')
    update_registration(classes=[Extender],
                        enabled_transforms=[],
                        disabled_transforms=[])
Beispiel #2
0
def collect_ops(path: str):
    """
    A function to registrate all MO ops
    :param path: Path to Model Optimizer folder
    :return:
    """
    import_by_path(os.path.join(path, 'mo', 'ops'), ['mo', 'ops'],
                   'openvino.tools.')
    update_registration(classes=[
        Op, Activation, Elementwise, UnaryElementwise, LogicalElementwise,
        EmbeddingBagBase, ReduceOp, Scatter, ScatterNDBase, FFTBase
    ],
                        enabled_transforms=[],
                        disabled_transforms=[])