ConvE icon indicating copy to clipboard operation
ConvE copied to clipboard

the number of relation

Open Yongquan-He opened this issue 6 years ago • 2 comments

I have 11 relations in my dataset, but I get nun_relations is 24. I know the relation_inverse, but why it is not 22? I also have another question, the index in str2var['e1'] and str2var['e2_multi1'] same or not, when I do like this? keys2keys['e1'] = 'e1' # entities keys2keys['rel'] = 'rel' # relations keys2keys['rel_eval'] = 'rel' # relations keys2keys['e2'] = 'e1' # entities keys2keys['e2_multi1'] = 'e1' # entity keys2keys['e2_multi2'] = 'e1' # entity input_keys = ['e1', 'rel', 'rel_eval', 'e2', 'e2_multi1', 'e2_multi2']

Yongquan-He avatar Nov 19 '19 07:11 Yongquan-He

Yeah, that can be a bit confusing. It is a bit weird software artifact. It is 11 (normal) + 11 (reverse) + 1 OOV relation + 1 "" relation. The last two relations have no effect on training because they are never used. It is an artifact of the vocab class of the spodernet library.

TimDettmers avatar Nov 19 '19 22:11 TimDettmers

I found that the number of entities in the calculation is also more than 1OOV entity +1"" entity, and these two parts appear in the first two entity embedding, are they also invalid in the training process? if I want to use conve as decoder, can I directly use self.emb_ e.weight.data [2:] = emb_e.data to replace the entity embedding?

Moon-xm avatar Jun 18 '21 00:06 Moon-xm