Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Models/webaskb_ptrnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def forward(self,input_variable, target_variable, loss=0, DO_TECHER_FORCING=Fals
result.append(np.argmax(decoder_attention.data[0].tolist()))

if type(loss)!=int:
loss_value = loss.data[0] / target_length
loss_value = loss.item() / target_length
else:
loss_value = 0
return loss_value , result, loss
return loss_value , result, loss
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ can be downloaded from [ComplexWebQuestions](http://nlp.cs.tau.ac.il/compwebq)

Now you can do any of the following:

* Generate the noisy supervision data for training `python -m webaskb_run.py gen_noisy_sup`.
* Run a pointer network to generate split points in the question `python -m webaskb_run.py run_ptrnet`.
* Train the pointer network `python -m webaskb_run.py train_ptrnet`.
* Create final predication and calculate p@1 scores `python -m webaskb_run.py splitqa`.
* NEW! Run evaluation script for dev set `python -m eval_script.py Data/complex_web_questions/ComplexWebQuestions_dev.json Data/predictions_dev.json`.
* Generate the noisy supervision data for training `python -m webaskb_run gen_noisy_sup`.
* Run a pointer network to generate split points in the question `python -m webaskb_run run_ptrnet`.
* Train the pointer network `python -m webaskb_run train_ptrnet`.
* Create final predication and calculate p@1 scores `python -m webaskb_run splitqa`.
* NEW! Run evaluation script for dev set `python -m eval_script Data/complex_web_questions/ComplexWebQuestions_dev.json Data/predictions_dev.json`.

Options: ‘—eval_set dev’ or ‘—eval_set test’ to choose between the development and test set.

Expand Down