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

Method RemoveRegularFanin

tensorflow/core/grappler/mutable_graph_view.cc:1103–1121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1101}
1102
1103Status MutableGraphView::RemoveRegularFanin(absl::string_view node_name,
1104 const TensorId& fanin) {
1105 auto error_status = [node_name, fanin](absl::string_view msg) {
1106 string params = absl::Substitute("node_name='$0', fanin='$1'", node_name,
1107 fanin.ToString());
1108 return MutationError("RemoveRegularFanin", params, msg);
1109 };
1110
1111 TF_RETURN_IF_ERROR(CheckFaninIsRegular(fanin, error_status));
1112 TF_RETURN_IF_ERROR(
1113 CheckRemovingFaninFromSelf(node_name, fanin, error_status));
1114 NodeDef* node = GetNode(node_name);
1115 TF_RETURN_IF_ERROR(CheckNodeExists(node_name, node, error_status));
1116 NodeDef* fanin_node = GetNode(fanin.node());
1117 TF_RETURN_IF_ERROR(CheckNodeExists(fanin.node(), fanin_node, error_status));
1118
1119 RemoveRegularFaninInternal(node, {fanin_node, fanin.index()});
1120 return Status::OK();
1121}
1122
1123Status MutableGraphView::RemoveRegularFaninByPort(absl::string_view node_name,
1124 int port) {

Callers

nothing calls this directly

Calls 7

MutationErrorFunction · 0.85
CheckFaninIsRegularFunction · 0.85
CheckNodeExistsFunction · 0.85
ToStringMethod · 0.45
nodeMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected