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

Function CheckValue

tensorflow/lite/kernels/pow.cc:95–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95TfLiteStatus CheckValue(TfLiteContext* context, const TfLiteTensor* input) {
96 const int64_t num_elements = NumElements(input);
97 const int32_t* data = GetTensorData<int32_t>(input);
98 for (int i = 0; i < num_elements; ++i) {
99 if (data[i] < 0) {
100 context->ReportError(context,
101 "POW does not support negative value for int32.");
102 return kTfLiteError;
103 }
104 }
105 return kTfLiteOk;
106}
107
108TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
109 OpData* data = reinterpret_cast<OpData*>(node->user_data);

Callers 1

EvalFunction · 0.85

Calls 2

NumElementsFunction · 0.70
ReportErrorMethod · 0.45

Tested by

no test coverage detected