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

Function CheckCondOutput

tensorflow/lite/kernels/while.cc:87–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87TfLiteStatus CheckCondOutput(TfLiteContext* context,
88 const TfLiteTensor* cond_output) {
89 // The condition output must be a single boolean value.
90 TF_LITE_ENSURE_EQ(context, cond_output->type, kTfLiteBool);
91 if (cond_output->dims->size == 0) {
92 // It's okay if it's a 0D scalar.
93 return kTfLiteOk;
94 }
95 // Otherwise it must be 1D with shape [1].
96 TF_LITE_ENSURE_EQ(context, cond_output->dims->size, 1);
97 TF_LITE_ENSURE_EQ(context, cond_output->dims->data[0], 1);
98 return kTfLiteOk;
99}
100
101} // namespace
102

Callers 2

PrepareFunction · 0.85
EvalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected