问题
How can I compare a Tensorflow string tensor to a python string type. I tried something like this
if(tf.constant("neg",tf.string) in key):
a=True
key here, is a tf.string. I want to see if 'neg' is in the key tensor.
回答1:
Unfortunately, currently you cannot. Please ask this on TF github in issues section.
来源:https://stackoverflow.com/questions/35946810/compare-tf-string-and-python-string