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

Function TwoElementVectorAndScalarOutputs

tensorflow/core/ops/io_ops.cc:40–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40Status TwoElementVectorAndScalarOutputs(InferenceContext* c) {
41 ShapeHandle handle;
42 DimensionHandle unused_handle;
43 for (int i = 0; i < c->num_inputs(); ++i) {
44 TF_RETURN_IF_ERROR(c->WithRank(c->input(i), 1, &handle));
45 TF_RETURN_IF_ERROR(c->WithValue(c->Dim(handle, 0), 2, &unused_handle));
46 }
47 for (int i = 0; i < c->num_outputs(); ++i) {
48 c->set_output(i, c->Scalar());
49 }
50 return Status::OK();
51}
52
53Status TwoElementOutput(InferenceContext* c) {
54 c->set_output(0, c->Vector(2));

Callers

nothing calls this directly

Calls 8

WithValueMethod · 0.80
num_inputsMethod · 0.45
WithRankMethod · 0.45
inputMethod · 0.45
DimMethod · 0.45
num_outputsMethod · 0.45
set_outputMethod · 0.45
ScalarMethod · 0.45

Tested by

no test coverage detected