You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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, 朱雪林 ***@***.***> 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
<#92>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGGbTZAYRo3w_8kmW4TWwyF5-MQd8mr2ks5tND26gaJpZM4RmR4I>
.
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.
The text was updated successfully, but these errors were encountered: