Open Quan-zzx opened 5 days ago
Hello, I will say yes and no. The relation decoding is multi-label because for every possible subject-object pair, a list of probabilities is computed for each predicate. So in theory, you can select more than one predicate per subject-object pair. However, in practice during training the learning is done such that the cross-entropy loss will optimize only the top relation. To modify this, you will need to change the loss and the dataloader a bit (remove this part for instance). The metric that validate multi-label relationships is called No Graph Constraint Recall and is already implemented here. You will have to activate it by modifying this line.
Hello, I will say yes and no. The relation decoding is multi-label because for every possible subject-object pair, a list of probabilities is computed for each predicate. So in theory, you can select more than one predicate per subject-object pair. However, in practice during training the learning is done such that the cross-entropy loss will optimize only the top relation. To modify this, you will need to change the loss and the dataloader a bit (remove this part for instance). The metric that validate multi-label relationships is called No Graph Constraint Recall and is already implemented here. You will have to activate it by modifying this line.
ok,thanks, I'll give it a try
Hello, I have a dataset,the same subject and object have multiple relationships,does the framework support multi relationship classification?