Dynamic-Clip-Attention icon indicating copy to clipboard operation
Dynamic-Clip-Attention copied to clipboard

how to produce the result published in your paper?

Open wailoktam opened this issue 7 years ago • 2 comments

Hi, I have tried the command given in the readme but it is not giving the result published in your paper. Do you achieve that with a different config that those given in the readme? Thanks.

wailoktam avatar Dec 21 '17 07:12 wailoktam

Have answered the question in your email? more confusion or question can be ask here, sorry for late again, I'm in travel recently.

wjbianjason avatar Dec 27 '17 14:12 wjbianjason

Thanks for your reply. Can you be more specific on the instruction? I do include the theano options. But I have to add device=cuda as the latest theano requires that. Can you tell me whether the epoch number given in the command found in the readme would give the result found in your paper? I am getting this as well:

Using Theano backend. ERROR (theano.gpuarray): pygpu was configured but could not be imported or is too old (version 0.7 or higher required) Traceback (most recent call last): File "/root/anaconda/lib/python2.7/site-packages/theano/gpuarray/init.py", line 23, in import pygpu ImportError: No module named pygpu

with the new theano.

Does that matter? And if yes, how can I handle the error?

I am getting this when trying k_max:

2017-12-28 08:36:48,917 [line:132] INFO wikiqa_k_max evaluate on test data at epoch 5 MAP: 0.719562 2017-12-28 08:36:48,918 [line:133] INFO evaluate on test data at epoch 5 MRR: 0.734092 2017-12-28 08:36:48,918 [line:170] INFO best model at epoch 3 2017-12-28 08:36:48,918 [line:171] INFO the dev score of best model: MAP_0.732828459019 MRR_0.738882105549 2017-12-28 08:36:48,918 [line:172] INFO the test score of best model: MAP_0.718857289271 MRR_0.732009514263

and I get the following error when trying k_threshold:

File "main.py", line 176, in main(args) File "main.py", line 103, in main train_model, predict_model = ModelFactory.get_model(model_param, embedding_file, vocab_all.NumIds(),model_type=args.model) File "/media/wailoktam/Dynamic-Clip-Attention/qa/model_factory.py", line 639, in get_model return ModelFactory.get_k_threshold_model(model_param, embedding_file, vocab_size) File "/media/wailoktam/Dynamic-Clip-Attention/qa/model_factory.py", line 402, in get_k_threshold_model basic_model = get_core_model(model_param,embedding_file,vocab_size) File "/media/wailoktam/Dynamic-Clip-Attention/qa/model_factory.py", line 334, in get_core_model answer_align = Align(question_proj,ques_atten_metrics,ques_filter_repeat_len,model_param.dec_timesteps, transpose=True) File "/media/wailoktam/Dynamic-Clip-Attention/qa/model_factory.py", line 270, in call output_shape=(max_length, self.nr_hidden)) File "/root/anaconda/lib/python2.7/site-packages/keras/legacy/layers.py", line 458, in merge name=name) File "/root/anaconda/lib/python2.7/site-packages/keras/legacy/layers.py", line 121, in init self(input_tensors, mask=input_masks) File "/root/anaconda/lib/python2.7/site-packages/keras/engine/topology.py", line 603, in call output = self.call(inputs, **kwargs) File "/root/anaconda/lib/python2.7/site-packages/keras/legacy/layers.py", line 202, in call return self.mode(inputs, **arguments) File "/media/wailoktam/Dynamic-Clip-Attention/qa/model_factory.py", line 263, in _normalize_attention k_threshold_e = K.switch(K.lesser_equal(sm_att,threshold), 0.0, sm_att) AttributeError: 'module' object has no attribute 'lesser_equal'

Thanks.

wailoktam avatar Jan 10 '18 02:01 wailoktam