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

Function Eval

tensorflow/lite/kernels/range.cc:126–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
127 const TfLiteTensor* start = GetInput(context, node, kStartTensor);
128 const TfLiteTensor* limit = GetInput(context, node, kLimitTensor);
129 const TfLiteTensor* delta = GetInput(context, node, kDeltaTensor);
130
131 TfLiteTensor* output = GetOutput(context, node, kOutputTensor);
132
133 if (IsDynamicTensor(output)) {
134 TF_LITE_ENSURE_OK(context,
135 ResizeOutput(context, start, limit, delta, output));
136 }
137
138 switch (output->type) {
139 case kTfLiteInt32: {
140 EvalImpl<int32_t>(start, delta, output);
141 break;
142 }
143 case kTfLiteFloat32: {
144 EvalImpl<float>(start, delta, output);
145 break;
146 }
147 default: {
148 context->ReportError(context, "Unsupported data type: %d", output->type);
149 return kTfLiteError;
150 }
151 }
152 return kTfLiteOk;
153}
154
155} // namespace
156} // namespace range

Callers

nothing calls this directly

Calls 5

GetInputFunction · 0.85
GetOutputFunction · 0.85
IsDynamicTensorFunction · 0.85
ResizeOutputFunction · 0.70
ReportErrorMethod · 0.45

Tested by

no test coverage detected