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

Function Prepare

tensorflow/lite/kernels/batch_to_space_nd.cc:101–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
102 TF_LITE_ENSURE_EQ(context, NumInputs(node), 3);
103 TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1);
104
105 BatchToSpaceNDContext op_context(context, node);
106 TF_LITE_ENSURE_EQ(context, NumDimensions(op_context.input),
107 kInputDimensionNum);
108 TF_LITE_ENSURE_EQ(context, op_context.input->type, op_context.output->type);
109
110 if (!IsConstantTensor(op_context.block_shape) ||
111 !IsConstantTensor(op_context.crops)) {
112 SetTensorToDynamic(op_context.output);
113 return kTfLiteOk;
114 }
115 return ResizeOutputTensor(context, &op_context);
116}
117
118template <KernelType kernel_type>
119TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {

Callers

nothing calls this directly

Calls 6

NumInputsFunction · 0.85
NumDimensionsFunction · 0.85
SetTensorToDynamicFunction · 0.85
NumOutputsFunction · 0.70
IsConstantTensorFunction · 0.70
ResizeOutputTensorFunction · 0.70

Tested by

no test coverage detected