Skip to content

using tf.constant() in td.Composition #92

@legend4917

Description

@legend4917

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'>"

Any help would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions