diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-06-19 10:04:40 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-06-19 10:08:16 -0700 |
commit | f1a08078db57de510f266d0d381220071aee2065 (patch) | |
tree | fd7440ec7d2fc9c690d73802868bb638a5118354 /tensorflow/contrib/lite/kernels/softmax_test.cc | |
parent | 7f449920f8910561a4e57cc35b96fb7faf08ef98 (diff) |
Apply runtime shapes to pooling and activation kernels.
PiperOrigin-RevId: 201194552
Diffstat (limited to 'tensorflow/contrib/lite/kernels/softmax_test.cc')
-rw-r--r-- | tensorflow/contrib/lite/kernels/softmax_test.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tensorflow/contrib/lite/kernels/softmax_test.cc b/tensorflow/contrib/lite/kernels/softmax_test.cc index 6c5338ff0f..727822f6be 100644 --- a/tensorflow/contrib/lite/kernels/softmax_test.cc +++ b/tensorflow/contrib/lite/kernels/softmax_test.cc @@ -92,10 +92,9 @@ TEST(SoftmaxOpTest, CompareWithTFminiBetaEq1) { m.Invoke(); std::unique_ptr<float[]> output_buffer(new float[input_size * batch_size]); - static tflite::Dims<4> input_dims = {{input_size, 1, 1, batch_size}, - {1, 0, 0, input_size}}; - tflite::reference_ops::Softmax(input_buffer, input_dims, beta, - output_buffer.get(), input_dims); + auto input_shape = RuntimeShape({batch_size, 1, 1, input_size}); + tflite::reference_ops::Softmax(input_buffer, input_shape, beta, + output_buffer.get(), input_shape); std::vector<float> expected; expected.insert(expected.end(), output_buffer.get(), @@ -120,10 +119,9 @@ TEST(SoftmaxOpTest, CompareWithTFminiBetaNotEq1) { m.Invoke(); std::unique_ptr<float[]> output_buffer(new float[input_size * batch_size]); - static tflite::Dims<4> input_dims = {{input_size, 1, 1, batch_size}, - {1, 0, 0, input_size}}; - tflite::reference_ops::Softmax(input_buffer, input_dims, beta, - output_buffer.get(), input_dims); + auto input_shape = RuntimeShape({batch_size, 1, 1, input_size}); + tflite::reference_ops::Softmax(input_buffer, input_shape, beta, + output_buffer.get(), input_shape); std::vector<float> expected; expected.insert(expected.end(), output_buffer.get(), |