diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-02-07 09:34:15 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-02-07 09:54:56 -0800 |
commit | ab0426e203cd81fb2247475eccdfcec0ddb8bf39 (patch) | |
tree | 99095ea742171f9a218471eb30a0dbc26bf45ef1 /tensorflow/core/kernels/resize_area_op_test.cc | |
parent | 661058e52460b36417573e2c5a73de9a8b9e5edb (diff) |
Improve performance of ResizeBilinear:
- use pointer arithmetic instead of accessing data through eigen single-cell
expressions.
- use only scale_down case, rename to resize_image. This simplifies the code,
at the cost of slightly worse performance for the scale_up case with one
channel (note though that special-casing single-channel case would make it 3x
faster than the AFTER times below).
- pull some common arithmetic out of loops manually, so that more common
indexing operations don't require multiplication.
- remove some assignments in inner loops.
(the first of these had the largest effect).
Add some more test and benchmark cases. Also fix a typo in the ResizeArea test.
Change: 146795860
Diffstat (limited to 'tensorflow/core/kernels/resize_area_op_test.cc')
-rw-r--r-- | tensorflow/core/kernels/resize_area_op_test.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/core/kernels/resize_area_op_test.cc b/tensorflow/core/kernels/resize_area_op_test.cc index 415bce3cce..cc5244d3a0 100644 --- a/tensorflow/core/kernels/resize_area_op_test.cc +++ b/tensorflow/core/kernels/resize_area_op_test.cc @@ -162,7 +162,7 @@ class ResizeAreaOpTest : public OpsTestBase { for (int in_h : {1, 3, 5, 8, 100, 233}) { for (int target_height : {1, 2, 3, 50, 113}) { for (int target_width : {target_height, target_height / 2 + 1}) { - RunRandomTest(in_w, in_h, target_height, target_width, channels); + RunRandomTest(in_h, in_w, target_height, target_width, channels); } } } |