MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _has_no_variables

Function _has_no_variables

tensorflow/python/tools/freeze_graph.py:62–74  ·  view source on GitHub ↗

Determines if the graph has any variables. Args: sess: TensorFlow Session. Returns: Bool.

(sess)

Source from the content-addressed store, hash-verified

60
61
62def _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
77def freeze_graph_with_def_protos(input_graph_def,

Callers 1

Calls 1

get_operationsMethod · 0.80

Tested by

no test coverage detected