我正在使用以下代码:“https://github.com/LouisFoucard/MC_DCNN/blob/master/.ipynb_checkpoints/MultiChannel_DeepConvNet-checkpoint.ipynb”
当我运行代码时,我得到一个错误:
TypeError: unsupported operand type(s) for +: 'dict_values' and 'list'
此错误与以下代码行有关:
train = theano.function(inps.values()+[target_values],cost, updates=updates)
我把这行改成:
^{pr2}$
这次我得到的错误是:
TypeError: Unknown parameter type:
看来Theano.功能不接受字典.值作为输入?在
谢谢
Tags:
似乎您正在尝试在Python3中运行一些Python2代码, 其中
dict.values
返回dictionary view object解决方案非常简单-只需将您的
dict.values
包装在list
中:相关问题 更多 >
编程相关推荐