1
$\begingroup$

I am debugging a code which I haven't written. I want to print out state_below_ variable which is calculated as following:

state_below_ = tensor.dot(state_below*emb_dropout[1], tparams[pp(prefix, 'W')]) +\
        tparams[pp(prefix, 'b')]

When I use state_below_.eval(), I get

MissingInputError: ("An input of the graph, used to compute Reshape{1}(y_sampler, TensorConstant{(1,) of -1}), was not provided and not given a value.Use the Theano flag exception_verbosity='high',for more information on this error.", y_sampler)

error. How can I print this damn "state_below_" value?

Thanks,

$\endgroup$

1 Answer 1

1
$\begingroup$

For evaluating and tensor, you have to pass the value of the input tensors as shown in the below code snippet.

import numpy
import theano.tensor as T
x = T.dscalar('x')
y = T.dscalar('y')
z = x + y
print(z.eval({x : 16.3, y : 12.1}))
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.