`tf.cond` TypeError: true_fn must be callable.错误

loss = tf.cond(loss < 0.4,tf.stop_gradient(loss), loss)修改为:loss = tf.cond(loss < 0.4,lambda :tf.stop_gradient(loss), lambda : loss)

posted @ 2022-04-27 00:10  呼叫哆啦A梦  阅读(277)  评论(0编辑  收藏  举报