Home
last modified time | relevance | path

Searched refs:string_to_id (Results 1 – 2 of 2) sorted by relevance

/external/tensorflow/tensorflow/python/debug/lib/
Dsource_remote.py48 def _string_to_id(string, string_to_id): argument
49 if string not in string_to_id:
50 string_to_id[string] = len(string_to_id)
51 return string_to_id[string]
62 string_to_id = dict()
63 string_to_id[None] = 0
67 file_id=_string_to_id(file_path, string_to_id),
69 function_id=_string_to_id(func_name, string_to_id),
70 line_id=_string_to_id(line_text, string_to_id))
73 for key, value in string_to_id.items():
/external/tensorflow/tensorflow/python/profiler/
Dtfprof_logger.py96 string_to_id = dict()
97 string_to_id['none'] = len(string_to_id)
118 trace.file_id = _str_id(tb[0], string_to_id) if tb[0] else 0
120 trace.function_id = _str_id(tb[2], string_to_id) if tb[2] else 0
121 trace.line_id = _str_id(tb[3], string_to_id) if tb[3] else 0
141 return logged_ops, string_to_id
166 logged_ops, string_to_id = _get_logged_ops(
186 for s, i in six.iteritems(string_to_id):