clovaai / bros

Apache License 2.0
155 stars 23 forks source link

Multiple linking ln Bros #28

Open prabakar2532002 opened 1 month ago

prabakar2532002 commented 1 month ago

I am trying out multiple linking in the model i have changed the "el_labels" shape to (2, self.max_seq_length) in order to give 2 links for each boxes, and i have changed the linking output by changing the parameter n_relations = 2

## in bros_dataset.py
### Line 410
el_labels = np.ones((2, self.max_seq_length), dtype=int) * self.max_seq_length
## in bros_spade_rel.py
### Line 51
self.relation_net = RelationExtractor(
    n_relations=2,
    backbone_hidden_size=self.backbone_hidden_size,
    head_hidden_size=self.head_hidden_size,
    head_p_dropout=self.head_p_dropout,
)

Anyone tell me how to change the loss function for the multi linking.