Lite: Range Op small refactor
This commit is contained in:
parent
f7e277d66d
commit
70a2406447
@ -93,18 +93,7 @@ TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
|
|||||||
TF_LITE_ENSURE_EQ(context, delta->type, dtype);
|
TF_LITE_ENSURE_EQ(context, delta->type, dtype);
|
||||||
TfLiteTensor* output = GetOutput(context, node, kOutputTensor);
|
TfLiteTensor* output = GetOutput(context, node, kOutputTensor);
|
||||||
|
|
||||||
switch (dtype) {
|
output->type = dtype;
|
||||||
case kTfLiteInt32:
|
|
||||||
output->type = kTfLiteInt32;
|
|
||||||
break;
|
|
||||||
case kTfLiteFloat32:
|
|
||||||
output->type = kTfLiteFloat32;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
context->ReportError(context, "Unknown index output data type: %d",
|
|
||||||
dtype);
|
|
||||||
return kTfLiteError;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IsConstantTensor(start) && IsConstantTensor(limit) &&
|
if (IsConstantTensor(start) && IsConstantTensor(limit) &&
|
||||||
IsConstantTensor(delta)) {
|
IsConstantTensor(delta)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user