[tflite] Make GetOptionalInputTensor
the same as GetInput
.
With the previous change, there is no more need for two separate APIs. We would deprecate `GetOptionalInputTensor` in the future. PiperOrigin-RevId: 332513386 Change-Id: Id7110271c25ebd6126ad8c82a493e37e0e0756b3
This commit is contained in:
parent
f2ebefba65
commit
00302787b7
@ -75,12 +75,7 @@ TfLiteTensor* GetOutput(TfLiteContext* context, const TfLiteNode* node,
|
||||
|
||||
const TfLiteTensor* GetOptionalInputTensor(const TfLiteContext* context,
|
||||
const TfLiteNode* node, int index) {
|
||||
const bool use_tensor = index < node->inputs->size &&
|
||||
node->inputs->data[index] != kTfLiteOptionalTensor;
|
||||
if (use_tensor) {
|
||||
return GetMutableInput(context, node, index);
|
||||
}
|
||||
return nullptr;
|
||||
return GetInput(context, node, index);
|
||||
}
|
||||
|
||||
// Per-axis
|
||||
|
Loading…
Reference in New Issue
Block a user