| 2377 | } |
| 2378 | |
| 2379 | Status GraphProperties::AnnotateOutputShapes(GraphDef* output_graph_def) const { |
| 2380 | *output_graph_def = item_.graph; |
| 2381 | for (int i = 0; i < output_graph_def->node_size(); i++) { |
| 2382 | auto node = output_graph_def->mutable_node(i); |
| 2383 | AttrValue attr_output_shape; |
| 2384 | auto tensor_properties = GetOutputProperties(node->name()); |
| 2385 | for (const auto& tensor_property : tensor_properties) { |
| 2386 | *attr_output_shape.mutable_list()->add_shape() = tensor_property.shape(); |
| 2387 | } |
| 2388 | (*node->mutable_attr())["_output_shapes"] = attr_output_shape; |
| 2389 | } |
| 2390 | return Status::OK(); |
| 2391 | } |
| 2392 | |
| 2393 | Status GraphProperties::InferFromCostGraph(const CostGraphDef& cost_graph) { |
| 2394 | if (cost_graph.node_size() == 0) { |
no test coverage detected