tensorflow: [TF 2.0] tf.assert_equal([], [1.0]) doesn't raise error

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Darwin Kernel Version 18.6.0
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: N/A
  • TensorFlow installed from (source or binary): binary
  • TensorFlow version (use command below): 2.0.0-dev20190827
  • Python version: Python 3.6.8 :: Anaconda, Inc.
  • Bazel version (if compiling from source): N/A
  • GCC/Compiler version (if compiling from source): N/A
  • CUDA/cuDNN version: N/A
  • GPU model and memory: N/A

Describe the current behavior tf.assert_equal([], [1.0]) doesn’t raise any error.

Code to reproduce the issue

import tensorflow as tf

tf.assert_equal([], [1.0])

Other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 26 (16 by maintainers)

Most upvoted comments

Update:

was saying empty list [] should do broadcast first, when shape does not match for cwise ops

There was a typo in the last message: was saying empty list [] should not do broadcast first, when shape does not match for cwise ops

@jvishnuvardhan I just upgrade to tf-nightly-2.0-preview-2.0.0.dev20190923 and tf.assert_equal([], [1.0]) still passes? I think @alextp 's comment was saying that this is indeed a bug, not work as expected?

I think it was resolved. I am closing the issue. But, please let me know if I’m mistaken. Thanks!

Please feel free to open a PR to update docs to reflect @alextp comments so that community will get benefited. Thanks!