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

Function Eval

tensorflow/lite/kernels/pow.cc:108–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
109 OpData* data = reinterpret_cast<OpData*>(node->user_data);
110
111 const TfLiteTensor* input1 = GetInput(context, node, kInputTensor1);
112 const TfLiteTensor* input2 = GetInput(context, node, kInputTensor2);
113 TfLiteTensor* output = GetOutput(context, node, kOutputTensor);
114
115 switch (output->type) {
116 case kTfLiteInt32: {
117 // TensorFlow does not support negative for int32.
118 TF_LITE_ENSURE_OK(context, CheckValue(context, input2));
119 PowImpl<int32_t>(input1, input2, output, data->requires_broadcast);
120 break;
121 }
122 case kTfLiteFloat32: {
123 PowImpl<float>(input1, input2, output, data->requires_broadcast);
124 break;
125 }
126 default: {
127 context->ReportError(context, "Unsupported data type: %d", output->type);
128 return kTfLiteError;
129 }
130 }
131 return kTfLiteOk;
132}
133
134} // namespace
135} // namespace pow

Callers

nothing calls this directly

Calls 4

GetInputFunction · 0.85
GetOutputFunction · 0.85
CheckValueFunction · 0.85
ReportErrorMethod · 0.45

Tested by

no test coverage detected