diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-02-05 18:45:13 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-02-05 18:48:59 -0800 |
commit | 1a0b637df8d082301118dd0f85ec63704f862aeb (patch) | |
tree | 9638dd8ae3174a20c456dd7d1569eddeea7330ba /tensorflow/contrib/lite/kernels/resize_bilinear.cc | |
parent | 09138338ed81b56aeaff88b9ee5a11c3f6d77b70 (diff) |
Export align_corners to TF Lite
PiperOrigin-RevId: 184622482
Diffstat (limited to 'tensorflow/contrib/lite/kernels/resize_bilinear.cc')
-rw-r--r-- | tensorflow/contrib/lite/kernels/resize_bilinear.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tensorflow/contrib/lite/kernels/resize_bilinear.cc b/tensorflow/contrib/lite/kernels/resize_bilinear.cc index 4a2101f246..c5d60cae3a 100644 --- a/tensorflow/contrib/lite/kernels/resize_bilinear.cc +++ b/tensorflow/contrib/lite/kernels/resize_bilinear.cc @@ -75,6 +75,9 @@ TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { template <KernelType kernel_type> TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { + auto* params = + reinterpret_cast<TfLiteResizeBilinearParams*>(node->builtin_data); + TfLiteTensor* input = GetInput(context, node, kInputTensor); TfLiteTensor* output = GetOutput(context, node, kOutputTensor); TfLiteTensor* size = GetInput(context, node, kSizeTensor); @@ -86,10 +89,11 @@ TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { } if (output->type == kTfLiteFloat32) { -#define TF_LITE_RESIZE_BILINEAR(type) \ - type::ResizeBilinear(GetTensorData<float>(input), GetTensorDims(input), \ - GetTensorData<int32>(size), GetTensorDims(size), \ - GetTensorData<float>(output), GetTensorDims(output)) +#define TF_LITE_RESIZE_BILINEAR(type) \ + type::ResizeBilinear(GetTensorData<float>(input), GetTensorDims(input), \ + GetTensorData<int32>(size), GetTensorDims(size), \ + GetTensorData<float>(output), GetTensorDims(output), \ + params->align_corners) if (kernel_type == kReference) { TF_LITE_RESIZE_BILINEAR(reference_ops); |