小编std*_*std的帖子

ValueError:`ConcreteFunction`s 的所有输入都必须是张量

我正在尝试通用句子编码器的一些示例,代码如下:

sentences_list = [
# phone related
'My phone is slow',
'My phone is not good',
'I need to change my phone. It does not work well',
'How is your phone?',

# age related
'What is your age?',
'How old are you?',
'I am 10 years old',

# weather related
'It is raining today',
'Would it be sunny tomorrow?',
'The summers are here.'
Run Code Online (Sandbox Code Playgroud)

]

with tf.Session() as session:

    session.run([tf.global_variables_initializer(), 
    tf.tables_initializer()])
    sentences_embeddings = session.run(embed.signatures['default'] (sentences_list))
Run Code Online (Sandbox Code Playgroud)

但得到错误:

ValueError:ConcreteFunctions 的所有输入都必须是张量;在调用 pruned …

python keras tensorflow

7
推荐指数
1
解决办法
2422
查看次数

标签 统计

keras ×1

python ×1

tensorflow ×1