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

Function ResizeOutput

tensorflow/lite/kernels/tile.cc:46–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46TfLiteStatus ResizeOutput(TfLiteContext* context, TfLiteNode* node) {
47 const TfLiteTensor* input = GetInput(context, node, kInputTensor);
48 TfLiteTensor* output = GetOutput(context, node, kOutputTensor);
49 const TfLiteTensor* multipliers = GetInput(context, node, kInputMultipliers);
50
51 const int num_dimensions = NumDimensions(input);
52 const int num_multipliers = NumElements(multipliers);
53 TF_LITE_ENSURE_EQ(context, num_dimensions, num_multipliers);
54 switch (multipliers->type) {
55 case kTfLiteInt32:
56 return context->ResizeTensor(
57 context, output,
58 MultiplyShapeDims<int32_t>(*input->dims, multipliers,
59 num_dimensions));
60 case kTfLiteInt64:
61 return context->ResizeTensor(
62 context, output,
63 MultiplyShapeDims<int64_t>(*input->dims, multipliers,
64 num_dimensions));
65 default:
66 context->ReportError(
67 context, "Multipliers of type '%s' are not supported by tile.",
68 TfLiteTypeGetName(multipliers->type));
69 return kTfLiteError;
70 }
71}
72
73template <typename T, typename M>
74void CopyMultipleTimes(const T* in_data, int32_t in_size, M multiplier,

Callers 2

PrepareFunction · 0.70
EvalFunction · 0.70

Calls 7

GetInputFunction · 0.85
GetOutputFunction · 0.85
NumDimensionsFunction · 0.85
TfLiteTypeGetNameFunction · 0.85
ResizeTensorMethod · 0.80
NumElementsFunction · 0.70
ReportErrorMethod · 0.45

Tested by

no test coverage detected