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 = misc.unique_list(all_outputs) return all_outputs
def test_unique_list(case): lst, expected = case assert misc.unique_list(lst) == expected
def check_outputs_not_found(not_found, available_outputs): if not_found: available_outputs = misc.unique_list(available_outputs) G_LOGGER.critical("The following outputs: {:} were not found. " "Note: Available tensors: {:}".format(not_found, available_outputs))