Tanvir
Tanvir

Reputation: 885

Compare tf.string and python string

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.

Upvotes: 0

Views: 1037

Answers (1)

lejlot
lejlot

Reputation: 66775

Unfortunately, currently you cannot. Please ask this on TF github in issues section.

Upvotes: 2

Related Questions