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

Function ExplicitShapes

tensorflow/core/framework/common_shape_fns.cc:2091–2104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2089}
2090
2091Status ExplicitShapes(InferenceContext* c) {
2092 std::vector<PartialTensorShape> shapes;
2093 TF_RETURN_IF_ERROR(c->GetAttr("shapes", &shapes));
2094 if (shapes.empty()) {
2095 return errors::Internal("shapes attribute is empty");
2096 }
2097 for (int i = 0; i < shapes.size(); ++i) {
2098 ShapeHandle output_shape;
2099 TF_RETURN_IF_ERROR(
2100 c->MakeShapeFromPartialTensorShape(shapes[i], &output_shape));
2101 c->set_output(i, output_shape);
2102 }
2103 return Status::OK();
2104}
2105
2106Status SparseReduceShapeFn(InferenceContext* c) {
2107 // Input 0: input_indices

Callers

nothing calls this directly

Calls 6

InternalFunction · 0.85
GetAttrMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45
set_outputMethod · 0.45

Tested by

no test coverage detected