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

Function StatelessShape

tensorflow/core/ops/stateless_random_ops.cc:25–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23using shape_inference::ShapeHandle;
24
25static Status StatelessShape(InferenceContext* c) {
26 // Check seed shape
27 ShapeHandle seed;
28 TF_RETURN_IF_ERROR(c->WithRank(c->input(1), 1, &seed));
29 DimensionHandle unused;
30 TF_RETURN_IF_ERROR(c->WithValue(c->Dim(seed, 0), 2, &unused));
31
32 // Set output shape
33 ShapeHandle out;
34 TF_RETURN_IF_ERROR(c->MakeShapeFromShapeTensor(0, &out));
35 c->set_output(0, out);
36 return Status::OK();
37}
38
39#define REGISTER_STATELESS_OP(name) \
40 REGISTER_OP(name) \

Callers 1

Calls 6

WithValueMethod · 0.80
WithRankMethod · 0.45
inputMethod · 0.45
DimMethod · 0.45
set_outputMethod · 0.45

Tested by

no test coverage detected