andyweizhao / NLP-Capsule

Towards Scalable and Reliable Capsule Networks for Challenging NLP Applications
122 stars 33 forks source link

In the test phase, it is against fairness to introduce the real data label into the model. #7

Closed lightcome closed 3 years ago

lightcome commented 4 years ago

In the test phase, it is against fairness to introduce the real data label into the model. In the real scenario, when the new data is input, the label of the data is not known, so there is no way to transfer this part of data. The corresponding code is EUR_eval.py line 98 candidate_labels = candidates[i, :].argsort()[-args.reranking:][::-1].tolist() , activations_2nd = capsule_net(data[i, :].unsqueeze(0), candidate_labels) Y_pred[i, candidate_labels] = activations_2nd.squeeze(2).data.cpu().numpy()

lightcome commented 4 years ago

I'm sorry for the question I asked, but the process of this model is to train a baseline model of CNN Kim first, then use this baseline model to reduce the prediction range of the model, and then train Capsule on this small range