(sess, graph_def, output_tensors,
hinted_outputs_nodes)
| 200 | |
| 201 | |
| 202 | def _convert_op_hints_if_present(sess, graph_def, output_tensors, |
| 203 | hinted_outputs_nodes): |
| 204 | if is_frozen_graph(sess): |
| 205 | raise ValueError("Try to convert op hints, needs unfrozen graph.") |
| 206 | output_arrays = [get_tensor_name(tensor) for tensor in output_tensors] |
| 207 | graph_def = tf_graph_util.convert_variables_to_constants( |
| 208 | sess, graph_def, output_arrays + hinted_outputs_nodes) |
| 209 | graph_def = convert_op_hints_to_stubs(graph_def=graph_def) |
| 210 | graph_def = tf_graph_util.remove_training_nodes(graph_def) |
| 211 | return graph_def |
| 212 | |
| 213 | |
| 214 | def freeze_graph(sess, input_tensors, output_tensors): |
no test coverage detected