Exemplo n.º 1
0
def all_tensor_names(model):
    all_outputs = [
        output for node in model.graph.node if node.op_type != "Constant"
        for output in node.output
    ]
    all_outputs = util.unique_list(all_outputs)
    return all_outputs
Exemplo n.º 2
0
def check_outputs_not_found(not_found, available_outputs):
    if not_found:
        available_outputs = util.unique_list(available_outputs)
        G_LOGGER.critical(
            "The following outputs were not found: {:}.\n"
            "Note: Available tensors:\n\t{:}".format(not_found, "\n\t".join(available_outputs))
        )
Exemplo n.º 3
0
def test_unique_list(case):
    lst, expected = case
    assert util.unique_list(lst) == expected