You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "balaram-cadence (via GitHub)" <gi...@apache.org> on 2023/01/30 16:05:27 UTC

[GitHub] [tvm] balaram-cadence commented on issue #13855: [Bug] [Frontend][Tensorflow] tf.where with broadcast condition fails to import due to Incompatible broadcast type

balaram-cadence commented on issue #13855:
URL: https://github.com/apache/tvm/issues/13855#issuecomment-1408887189

   This test fails with numpy and tensorflow 2.x but works fine with tensorflow 1.x:
   ```
   import numpy as np
   import tensorflow as tf
   
   try:
       tf_compat_v1 = tf.compat.v1
   except:
       tf_compat_v1 = tf
   
   t1 = np.arange(5, dtype="float32")
   t2 = np.arange(5, dtype="float32")[::-1]
   x = np.arange(10, dtype="float32").reshape(5,2)
   y = np.arange(10, dtype="float32")[::-1].reshape(5,2)
   condition = np.less(t1, t2)
   print("tf1.x output:")
   print(tf_compat_v1.where(condition, x, y))
   print("tf2.x output:")
   print(tf.where(condition, x, y))
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org