Fix tf.assert_equal issue when one tenor is empty and another is non-empty
Fix tf.assert_equal issue when one tenor is empty and another is non-empty

This fix tries to address the issue raised in 32082 where
tf.assert_equal([], [1.0]) doesn't raise error.
The reason was that in assert_equal `[1.0]` was broadcasted
as `[]` and equal was in place in that situation.

This PR updates the _binary_asesert so that it will check if
x, y are both empty or both non-empty. If one is empty and another is
non-empty, then assertion throws exception. This change is to not impact
other ops that depends on the broadcast behavior.

This fix fixes 32082.

Signed-off-by: Yong Tang <765086fe2e0c1f980161f127fec596800f327f62@outlook.com>

annarev/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,aldian/tensorflow,xzturn/tensorflow,arborh/tensorflow,xzturn/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,davidzchen/tensorflow,adit-chandra/tensorflow,freedomtan/tensorflow,paolodedios/tensorflow,xzturn/tensorflow,freedomtan/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow,paolodedios/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_saved_model,gunan/tensorflow,aldian/tensorflow,yongtang/tensorflow,renyi533/tensorflow,gautam1858/tensorflow,jhseu/tensorflow,frreiss/tensorflow-fred,gautam1858/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow,gautam1858/tensorflow,freedomtan/tensorflow,freedomtan/tensorflow,davidzchen/tensorflow,paolodedios/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow,gautam1858/tensorflow,gautam1858/tensorflow,aam-at/tensorflow,aam-at/tensorflow,adit-chandra/tensorflow,annarev/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-pywrap_saved_model,frreiss/tensorflow-fred,xzturn/tensorflow,freedomtan/tensorflow,arborh/tensorflow,Intel-Corporation/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow,renyi533/tensorflow,sarvex/tensorflow,arborh/tensorflow,ppwwyyxx/tensorflow,sarvex/tensorflow,paolodedios/tensorflow,Intel-tensorflow/tensorflow,cxxgtxy/tensorflow,aam-at/tensorflow,annarev/tensorflow,renyi533/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,frreiss/tensorflow-fred,petewarden/tensorflow,freedomtan/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,jhseu/tensorflow,aam-at/tensorflow,Intel-tensorflow/tensorflow,frreiss/tensorflow-fred,jhseu/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,ppwwyyxx/tensorflow,annarev/tensorflow,gunan/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow,cxxgtxy/tensorflow,davidzchen/tensorflow,xzturn/tensorflow,Intel-Corporation/tensorflow,gunan/tensorflow,petewarden/tensorflow,jhseu/tensorflow,paolodedios/tensorflow,petewarden/tensorflow,aldian/tensorflow,karllessard/tensorflow,Intel-Corporation/tensorflow,karllessard/tensorflow,freedomtan/tensorflow,aldian/tensorflow,Intel-tensorflow/tensorflow,renyi533/tensorflow,arborh/tensorflow,karllessard/tensorflow,ppwwyyxx/tensorflow,cxxgtxy/tensorflow,renyi533/tensorflow,gautam1858/tensorflow,freedomtan/tensorflow,karllessard/tensorflow,arborh/tensorflow,freedomtan/tensorflow,karllessard/tensorflow,jhseu/tensorflow,petewarden/tensorflow,renyi533/tensorflow,ppwwyyxx/tensorflow,petewarden/tensorflow,Intel-Corporation/tensorflow,arborh/tensorflow,gautam1858/tensorflow,gunan/tensorflow,frreiss/tensorflow-fred,annarev/tensorflow,aam-at/tensorflow,jhseu/tensorflow,gunan/tensorflow,sarvex/tensorflow,arborh/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,gunan/tensorflow,adit-chandra/tensorflow,ppwwyyxx/tensorflow,frreiss/tensorflow-fred,davidzchen/tensorflow,ppwwyyxx/tensorflow,cxxgtxy/tensorflow,petewarden/tensorflow,xzturn/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,sarvex/tensorflow,adit-chandra/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,jhseu/tensorflow,paolodedios/tensorflow,xzturn/tensorflow,Intel-tensorflow/tensorflow,aam-at/tensorflow,aam-at/tensorflow,gunan/tensorflow,adit-chandra/tensorflow,sarvex/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-experimental_link_static_libraries_once,renyi533/tensorflow,annarev/tensorflow,davidzchen/tensorflow,annarev/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,ppwwyyxx/tensorflow,jhseu/tensorflow,adit-chandra/tensorflow,arborh/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,xzturn/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,karllessard/tensorflow,Intel-tensorflow/tensorflow,yongtang/tensorflow,gautam1858/tensorflow,karllessard/tensorflow,aldian/tensorflow,yongtang/tensorflow,petewarden/tensorflow,gautam1858/tensorflow,gunan/tensorflow,xzturn/tensorflow,davidzchen/tensorflow,jhseu/tensorflow,annarev/tensorflow,aam-at/tensorflow,cxxgtxy/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aam-at/tensorflow,frreiss/tensorflow-fred,xzturn/tensorflow,davidzchen/tensorflow,sarvex/tensorflow,renyi533/tensorflow,annarev/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,aldian/tensorflow,frreiss/tensorflow-fred,gautam1858/tensorflow,aam-at/tensorflow,arborh/tensorflow,frreiss/tensorflow-fred,karllessard/tensorflow,Intel-Corporation/tensorflow,Intel-Corporation/tensorflow,Intel-tensorflow/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,aldian/tensorflow,frreiss/tensorflow-fred,yongtang/tensorflow,paolodedios/tensorflow,davidzchen/tensorflow,petewarden/tensorflow,renyi533/tensorflow,davidzchen/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-Corporation/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,ppwwyyxx/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gunan/tensorflow,petewarden/tensorflow,petewarden/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,gunan/tensorflow,karllessard/tensorflow,renyi533/tensorflow,davidzchen/tensorflow,yongtang/tensorflow,gunan/tensorflow,renyi533/tensorflow,cxxgtxy/tensorflow,freedomtan/tensorflow,yongtang/tensorflow,adit-chandra/tensorflow,xzturn/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,paolodedios/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,freedomtan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,arborh/tensorflow,sarvex/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,ppwwyyxx/tensorflow,arborh/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aam-at/tensorflow,gautam1858/tensorflow,xzturn/tensorflow,arborh/tensorflow,gunan/tensorflow,renyi533/tensorflow,aam-at/tensorflow,Intel-tensorflow/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_saved_model,sarvex/tensorflow,ppwwyyxx/tensorflow,aldian/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,annarev/tensorflow,adit-chandra/tensorflow,jhseu/tensorflow,jhseu/tensorflow,karllessard/tensorflow,petewarden/tensorflow