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

Function error

tensorflow/python/ops/cond_v2.py:701–717  ·  view source on GitHub ↗
(branch_idx, error_detail)

Source from the content-addressed store, hash-verified

699 """Raises an error if `graphs` have different outputs."""
700
701 def error(branch_idx, error_detail):
702 raise TypeError(
703 "{b0_name} and {bn_name} arguments to {op_name} must have the same "
704 "number, type, and overall structure of return values.\n"
705 "\n"
706 "{b0_name} output: {b0_out}\n"
707 "{bn_name} output: {bn_out}\n"
708 "\n"
709 "Error details:\n"
710 "{detail}".format(
711 b0_name="true_fn" if op_type == _COND else "branches[0]",
712 bn_name=("false_fn" if op_type == _COND else
713 "branches[{}]".format(branch_idx)),
714 op_name="tf.cond" if op_type == _COND else "tf.switch_case",
715 b0_out=graphs[0].structured_outputs,
716 bn_out=graphs[branch_idx].structured_outputs,
717 detail=error_detail))
718
719 for b in range(1, len(graphs)):
720 try:

Callers 2

_check_same_outputsFunction · 0.70
InferSliceShapeMethod · 0.50

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected