diff options
author | Skye Wanderman-Milne <skyewm@google.com> | 2018-06-15 15:29:33 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-06-15 15:35:54 -0700 |
commit | 1d74a69443f741e69f9f52cb6bc2940b4d4ae3b7 (patch) | |
tree | 04ebebb6146abb1bd2ab128cc0731f935a82af84 /tensorflow/contrib/signal | |
parent | b8861afe21d8d654c2a726cabd82069faca04532 (diff) |
Enable fetching shapes from the C API by default.
Prior this change, we were using the C API for everything except
Tensor.shape calls, which returned the result from the original Python
shape inference code. With this change, we use the C API in this case
as well. The C API has better shape inference, so this has the effect
of returning more precise shapes in some cases.
This change can be disabled by setting the environment variable
TF_C_API_GRAPH_CONSTRUCTION_SHAPES=0. However, this toggle will
be removed altogether in the near future.
This also fixes a bug in the SWIG that could cause large shape dimensions
to be incorrect.
PiperOrigin-RevId: 200783822
Diffstat (limited to 'tensorflow/contrib/signal')
-rw-r--r-- | tensorflow/contrib/signal/python/kernel_tests/spectral_ops_test.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/contrib/signal/python/kernel_tests/spectral_ops_test.py b/tensorflow/contrib/signal/python/kernel_tests/spectral_ops_test.py index 03d6da7765..f10d78259a 100644 --- a/tensorflow/contrib/signal/python/kernel_tests/spectral_ops_test.py +++ b/tensorflow/contrib/signal/python/kernel_tests/spectral_ops_test.py @@ -147,7 +147,7 @@ class SpectralOpsTest(test.TestCase): inverse_stft = spectral_ops.inverse_stft(stft, frame_length=8, fft_length=16, frame_step=8) expected_length = (stft.shape[0] - 1) * 8 + 8 - self.assertAllEqual([None], inverse_stft.shape.as_list()) + self.assertAllEqual([256], inverse_stft.shape.as_list()) self.assertAllEqual([expected_length], inverse_stft.eval().shape) def test_stft_and_inverse_stft(self): |