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

Function _check_num_inputs_outputs

tensorflow/python/ops/while_v2.py:1073–1085  ·  view source on GitHub ↗

Checks the number of inputs/outputs of `cond_graph` and `body_graph`.

(cond_graph, body_graph, num_flattened_loop_vars)

Source from the content-addressed store, hash-verified

1071
1072
1073def _check_num_inputs_outputs(cond_graph, body_graph, num_flattened_loop_vars):
1074 """Checks the number of inputs/outputs of `cond_graph` and `body_graph`."""
1075 assert len(cond_graph.inputs) == num_flattened_loop_vars, (
1076 "cond_graph takes %d inputs; Expected: %d" % (len(cond_graph.inputs),
1077 num_flattened_loop_vars))
1078 assert len(cond_graph.outputs) == 1, (
1079 "cond_graph has %d outputs; Expected: 1" % len(cond_graph.outputs))
1080 assert len(body_graph.inputs) == num_flattened_loop_vars, (
1081 "body_graph takes %d inputs; Expected: %d" % (len(body_graph.inputs),
1082 num_flattened_loop_vars))
1083 assert len(body_graph.outputs) == num_flattened_loop_vars, (
1084 "body_graph has %d outputs; Expected: %d" % (len(body_graph.outputs),
1085 num_flattened_loop_vars))
1086
1087
1088def _check_inputs_outputs_types_match(body_graph, flattened_loop_vars):

Callers 2

while_loopFunction · 0.85
_WhileGradFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected