Determines if the graph has any variables. Args: sess: TensorFlow Session. Returns: Bool.
(sess)
| 60 | |
| 61 | |
| 62 | def _has_no_variables(sess): |
| 63 | """Determines if the graph has any variables. |
| 64 | |
| 65 | Args: |
| 66 | sess: TensorFlow Session. |
| 67 | |
| 68 | Returns: |
| 69 | Bool. |
| 70 | """ |
| 71 | for op in sess.graph.get_operations(): |
| 72 | if op.type.startswith("Variable") or op.type.endswith("VariableOp"): |
| 73 | return False |
| 74 | return True |
| 75 | |
| 76 | |
| 77 | def freeze_graph_with_def_protos(input_graph_def, |
no test coverage detected