tensorflow/core/grappler/optimizers/arithmetic_optimizer.cc
// Replace a node with NoOp and reset shape inference results for it..
Replace a node with NoOp and reset shape inference results for it
Replace a node with NoOp and reset shape inference results for it
void ReplaceWithNoOp(NodeDef* node, const GraphOptimizerContext& ctx) {
  ctx.node_map->RemoveInputs(node->name());
  ctx.graph_properties->ClearInputProperties(node->name());
  ctx.graph_properties->ClearOutputProperties(node->name());
  EraseRegularNodeAttributes(node);
  node->set_op("NoOp");
  node->clear_input();
}
void ReplaceWithNoOp ( NodeDef * node , const GraphOptimizerContext & ctx ) { ctx . node_map -> RemoveInputs ( node -> name ( ) ) ; ctx . graph_properties -> ClearInputProperties ( node -> name ( ) ) ; ctx . graph_properties -> ClearOutputProperties ( node -> name ( ) ) ; EraseRegularNodeAttributes ( node ) ; node -> set_op ( " " ) ; node -> clear_input ( ) ; }
Replace a node with NoOp and reset shape inference results for it..
Replace a node with NoOp and reset shape inference results for it ..