GateNLP / gate-lf-pytorch-json

PyTorch wrapper for the LearningFramework GATE plugin
Apache License 2.0
1 stars 2 forks source link

Make sure evaluation is correctly done for sequences #4

Open johann-petrak opened 6 years ago

johann-petrak commented 6 years ago

For the loss, the padding index of 0 should prevent calculating the wrong loss by including the padded elements. However for training/validation accuracy we must make sure that our method only uses the values for non-padded inputs (in the outputs, we do not have an actual padding index since index 0 actually represents some class).