Will automatically determine if ``name`` is a tensor name (ends with ':x') or a op name. If it is an op name, the corresponding tensor name is assumed to be ``op_name + ':0'``. Args: name(str): name of an op or a tensor Returns: tuple: (op_name, tensor_name)
(name)
| 86 | |
| 87 | |
| 88 | def get_op_tensor_name(name): |
| 89 | """ |
| 90 | Will automatically determine if ``name`` is a tensor name (ends with ':x') |
| 91 | or a op name. |
| 92 | If it is an op name, the corresponding tensor name is assumed to be ``op_name + ':0'``. |
| 93 | |
| 94 | Args: |
| 95 | name(str): name of an op or a tensor |
| 96 | Returns: |
| 97 | tuple: (op_name, tensor_name) |
| 98 | """ |
| 99 | if len(name) >= 3 and name[-2] == ':': |
| 100 | return name[:-2], name |
| 101 | else: |
| 102 | return name, name + ':0' |
| 103 | |
| 104 | |
| 105 | def get_tensors_by_names(names): |
no outgoing calls
no test coverage detected