【发布时间】:2016-07-21 19:07:55
【问题描述】:
我正在尝试使用 theano/lasagne 实现 CNN。 我已经制作了一个神经网络,但不知道如何在当前状态下对其进行训练。
这就是我试图以current_states 作为输入来获取网络输出的方式。
train = theano.function([input_var], lasagne.layers.get_output(l.out))
output = train(current_states)
但是我得到了这个错误:
theano.compile.function_module.UnusedInputError: theano.function was asked to create a function computing outputs given certain inputs, but the provided input variable at index 0 is not part of the computational graph needed to compute the outputs: inputs.
To make this error into a warning, you can pass the parameter on_unused_input='warn' to theano.function. To disable it completely, use on_unused_input='ignore'.
为什么不使用 current_states?
我想在 current_states 上获得模型的输出。我该怎么做?
(CNN 构建代码:http://pastebin.com/Gd35RncU)
【问题讨论】:
标签: python machine-learning theano conv-neural-network lasagne