cairoHy / RC-experiments

Reading Comprehension Experiments repository.
GNU General Public License v3.0
61 stars 27 forks source link

Stupid question about using the code #1

Closed mrcocytus closed 7 years ago

mrcocytus commented 7 years ago

hello, I'm starting to use your code, but actually don't understand the [module.model_class] and the args.json in your readme, so I don't know how to test the code. Can you give the specific usage, or just give me the example to type the command. Thank you.

cairoHy commented 7 years ago

Module is the file name of model, model_class is the class name of model. For example, if you want to test AoA-Reader, the command is

python attention_over_attention_reader.AoAReader ....
mrcocytus commented 7 years ago

Hello, I wonder how to write the predicted answer of the test set into a fie.

cairoHy commented 7 years ago

The accuracy variable(and other information) will be stored to a file named result.json after test, you don't need to store it manually.

cairoHy commented 7 years ago

It's because i don't close tensorflow session after execution, but the result will not be influenced, and your training is ending normally with val acc of 0.7570.

mrcocytus commented 7 years ago

Thank you for your help. I mean that how to store the predicted answers to the cloze-style reading comprehension, the result.json only contains accuracy, not answers to the test set.

cairoHy commented 7 years ago

You have to write the code by yourself, i didn't implement the function.

mrcocytus commented 7 years ago

Can you kindly give me some ideas about that?

cairoHy commented 7 years ago

You should modify the model you use(for example models/attention_sum_reader.py), and let it return the predictions). Next modify the test method of models/rc_base.py, and calculate the predictions and serialize it.