比较tf.string和python字符串 [英] Compare tf.string and python string

查看:69
本文介绍了比较tf.string和python字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将Tensorflow字符串张量与python字符串类型进行比较.我尝试过这样的事情

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

键在这里,是一个tf.string.我想看看关键点张量中是否包含"neg".

key here, is a tf.string. I want to see if 'neg' is in the key tensor.

推荐答案

不幸的是,当前您不能.请在问题部分的TF github上问这个问题.

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

这篇关于比较tf.string和python字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆