tf.cast() causes my program to fail back propagation, how can I solve this problem?

前端 未结 0 461
醉梦人生
醉梦人生 2020-11-30 09:57
import tensorflow as tf
tf.compat.v1.disable_eager_execution()

a = tf.constant([[1,7,3]],dtype=tf.float32)
b = tf.cast(a,dtype=tf.int32)

f = tf.gradients(b,a)
with         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题