diff options
author | Benoit Steiner <bsteiner@google.com> | 2018-03-28 21:07:02 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-03-28 21:09:28 -0700 |
commit | 5bc7c510fd99dd6f887eb2c5834ae8297891dea7 (patch) | |
tree | 25f119a3e1cbe0412906e19716efd29cf3d2271f /tensorflow/contrib/signal | |
parent | 3f7adc710495e1160acd956c482779247ef1f101 (diff) |
Fixed the shape function of the SplitV op that incorrectly often assumed that
the shape of all the outputs is the same.
PiperOrigin-RevId: 190879600
Diffstat (limited to 'tensorflow/contrib/signal')
-rw-r--r-- | tensorflow/contrib/signal/python/kernel_tests/shape_ops_test.py | 5 | ||||
-rw-r--r-- | tensorflow/contrib/signal/python/ops/shape_ops.py | 2 |
2 files changed, 1 insertions, 6 deletions
diff --git a/tensorflow/contrib/signal/python/kernel_tests/shape_ops_test.py b/tensorflow/contrib/signal/python/kernel_tests/shape_ops_test.py index bc4663fbb0..64cc8c7ea5 100644 --- a/tensorflow/contrib/signal/python/kernel_tests/shape_ops_test.py +++ b/tensorflow/contrib/signal/python/kernel_tests/shape_ops_test.py @@ -338,10 +338,7 @@ class FrameTest(test.TestCase): def test_constant_folding(self): """frame should be constant foldable for constant inputs.""" - # Padding is incorrectly defined in shape_ops.py (the rank of the padding - # tensor should be equal to the rank of the input tensor + 1): only test - # with padding set to False to avoid this. - for pad_end in [False]: + for pad_end in [True, False]: g = ops.Graph() with g.as_default(): frame_length, frame_step = 32, 16 diff --git a/tensorflow/contrib/signal/python/ops/shape_ops.py b/tensorflow/contrib/signal/python/ops/shape_ops.py index 97fe20866b..1ddc2941ec 100644 --- a/tensorflow/contrib/signal/python/ops/shape_ops.py +++ b/tensorflow/contrib/signal/python/ops/shape_ops.py @@ -139,8 +139,6 @@ def frame(signal, frame_length, frame_step, pad_end=False, pad_value=0, axis=-1, [[0, pad_samples]], array_ops.zeros([num_inner_dimensions, 2], dtype=pad_samples.dtype)], 0) - # TODO(rjryan): the paddings tensor must of rank tf.rank(signal) + 1. This - # isn't the case here and should be fixed. signal = array_ops.pad(signal, paddings, constant_values=pad_value) signal_shape = array_ops.shape(signal) |