The error does not happen in that specific line, it is just the way
Python reports the error.

The most likely explanation is that layer3.y_pred does not depend on
test_set_x or test_set_y. It may be that you used a constant instead of
a symbolic variable at some point of the computation.

On Wed, Aug 10, 2016, Duc Nguyen wrote:
> test_model = theano.function(
> inputs = [index],
> outputs = layer3.y_pred,
> givens={
> x: test_set_x[index * batch_size: (index + 1) * batch_size],
> y: test_set_y[index * batch_size: (index + 1) * batch_size]
>         }
> )
> 
> 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 1 is not part of the computational graph 
> needed to compute the outputs: <CudaNdarrayType(float32, vector)>.
> 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'.
> 
> ...
> 
> layer3 is a LogisticRegression class
> error in line "outputs = layer3.y_pred"
> help me!
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "theano-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.


-- 
Pascal

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to