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

Function Eval

tensorflow/lite/kernels/expand_dims.cc:90–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
91 // Just copy input to output.
92 const TfLiteTensor* input = GetInput(context, node, kInput);
93 TfLiteTensor* output = GetOutput(context, node, 0);
94 const TfLiteTensor* axis = GetInput(context, node, kAxis);
95 if (IsDynamicTensor(output)) {
96 int axis_value;
97 TF_LITE_ENSURE_OK(context,
98 GetAxisValueFromTensor(context, *axis, &axis_value));
99 TF_LITE_ENSURE_OK(context,
100 ExpandTensorDim(context, *input, axis_value, output));
101 }
102 memcpy(output->data.raw, input->data.raw, input->bytes);
103 return kTfLiteOk;
104}
105
106} // namespace expand_dims
107TfLiteRegistration* Register_EXPAND_DIMS() {

Callers

nothing calls this directly

Calls 5

GetInputFunction · 0.85
GetOutputFunction · 0.85
IsDynamicTensorFunction · 0.85
GetAxisValueFromTensorFunction · 0.85
ExpandTensorDimFunction · 0.85

Tested by

no test coverage detected