【发布时间】:2018-12-06 18:34:47
【问题描述】:
当我运行代码时,我收到以下错误:
TypeError:+ 不支持的操作数类型:“dict_values”和“list”
这个错误和这行代码有关:
train = theano.function(inps.values()+[target_values],cost, updates=updates)
我将这一行改为:
train = theano.function(inputs=[inps.values(), target_values], outputs=cost, updates=updates)
这次我得到的错误是:
TypeError:未知参数类型:
这似乎 Theano.function 不接受 Dictionary.values 作为输入?
谢谢
【问题讨论】:
-
请阅读How to Ask,将minimal reproducible example的相关部分直接包含在问题中,并确保格式看起来令人愉悦。
-
查看formatting help 了解如何格式化您的代码示例。
标签: python dictionary input theano