Open legend4917 opened 6 years ago
You can't mix TensorFlow expressions like "tf.constant", and block combinators like that. Block combinators operate on blocks, not tensors. TensorFlow code has to be wrapped in td.FromTensor or td.Function.
On Sun, Jan 21, 2018 at 11:50 PM, 朱雪林 notifications@github.com wrote:
I got a problem recently, describe briefly as follow:
`def xxx(ss): word = [1 for _ in range(ss)] return word
c = td.Composition(name="ccc") with c.scope(): aa = c.input b = tf.constant(aa) c.output.reads(b)
res = td.InputTransform(xxx) >> c
with tf.Session() as sess: print(res.eval(10)) ` running the code got TypeError: Expected binary or unicode string, got <td.Composition.input 'ccc'>
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tensorflow/fold/issues/92, or mute the thread https://github.com/notifications/unsubscribe-auth/AGGbTZAYRo3w_8kmW4TWwyF5-MQd8mr2ks5tND26gaJpZM4RmR4I .
-- DeLesley Hutchins | Software Engineer | delesley@google.com | 505-206-0315
I got a problem recently, describe briefly as follow:
running the code got "TypeError: Expected binary or unicode string, got <td.Composition.input 'ccc'>"
Any help would be greatly appreciated.