如何将 Tensorflow 字符串张量与 python 字符串类型进行比较。我尝试过这样的事情
if(tf.constant("neg",tf.string) in key):
a=True
这里的键是一个 tf.string。我想看看"neg"是否在键张量中。
不幸的是,目前你不能。请在TF github的问题部分提出这个问题。