我使用了很多dtype="str"
数据。我一直在尝试构建一个简单的图,如https://www.tensorflow.org/versions/master/api_docs/python/train.html#SummaryWriter。合并TensorFlow中的字符串张量
对于一个简单的操作,我想使用的字符串连接在一起placeholder
如(How to feed a placeholder?)
有谁知道如何串张量合并到一起?
import tensorflow as tf
sess = tf.InteractiveSession()
with tf.name_scope("StringSequence") as scope:
left = tf.constant("aaa",name="LEFT")
middle = tf.placeholder(dtype=tf.string, name="MIDDLE")
right = tf.constant("ccc",name="RIGHT")
complete = tf.add_n([left,middle,right],name="COMPLETE") #fails here
sess.run(complete,feed_dict={middle:"BBB"})
#writer = tf.train.SummaryWriter("https://stackoverflow.com/users/mu/test_out/", sess.graph_def)
你有没有找到一种方法来让这个工作?应用这个有点令人困惑。 –