julianser/hed-dlg-truncated

evaluate error

Closed this issue · 1 comments

Hi,
After forked the project, I trained prototype_test well, however, I came across a evaluation err in evaluate.py. Could any one tell me how to make it alright ?

THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python evaluate.py --exclude-stop-words --test-path tests/data/ttest.dialogues.pkl tests/models/1459331593.2_testmodel
Using gpu device 0: Tesla K40c (CNMeM is disabled, CuDNN not available)
/data1/qspace/ivycui/hed-dlg-truncated-master/dialog_encdec.py:1362: UserWarning: theano.function was asked to create a function computing outputs given certain inputs, but the provided input variable at index 6 is not part of the computational graph needed to compute the outputs: ran_cost_utterance.
To make this warning into an error, you can pass the parameter on_unused_input='raise' to theano.function. To disable it completely, use on_unused_input='ignore'.
on_unused_input='warn', name="eval_fn")
/data1/qspace/ivycui/hed-dlg-truncated-master/dialog_encdec.py:1362: UserWarning: theano.function was asked to create a function computing outputs given certain inputs, but the provided input variable at index 7 is not part of the computational graph needed to compute the outputs: x_dropmask.
To make this warning into an error, you can pass the parameter on_unused_input='raise' to theano.function. To disable it completely, use on_unused_input='ignore'.
on_unused_input='warn', name="eval_fn")
evaluate_mode True
Warning no file with document ids given... standard deviations cannot be computed.
Traceback (most recent call last):
File "evaluate.py", line 174, in
main()
File "evaluate.py", line 143, in main
c, _, c_list, _, _ = eval_batch(x_data, x_data_reversed, max_length, x_cost_mask, reset_mask, ran_cost_utterance, ran_decoder_drop_mask)
File "/home/qspace/anaconda2/lib/python2.7/site-packages/Theano-0.8.0-py2.7.egg/theano/compile/function_module.py", line 786, in call
allow_downcast=s.allow_downcast)
File "/home/qspace/anaconda2/lib/python2.7/site-packages/Theano-0.8.0-py2.7.egg/theano/tensor/type.py", line 177, in filter
data.shape))
TypeError: ('Bad input argument to theano function with name "eval_fn" at index 4(0-based)', 'Wrong number of dimensions: expected 2, got 1 with shape (5,).')

Right now, the evaluate.py script is not supported for the models although it might be in the future!

If you wish to evaluate a model w.r.t. its perplexity, I would recommend you to use the former github repository: https://github.com/julianser/hed-dlg.