In file "translation" line 210-215
self.ent_emb.weight.data = normalize(self.ent_emb.weight.data,
p=2, dim=1)
self.norm_vect.weight.data = normalize(self.norm_vect.weight.data,
p=2, dim=1)
self.rel_emb.weight.data = self.project(self.ent_emb.weight.data,
self.norm_vect.weight.data)
For self.rel_emb.weight.data, why is "self.project(self.ent_emb.weight.data,self.norm_vect.weight.data)"?
And it shows this bug, during the model initialization phase:
RuntimeError: The size of tensor a (14541) must match the size of tensor b (237) at non-singleton dimension 0
Description
In file "translation" line 210-215 self.ent_emb.weight.data = normalize(self.ent_emb.weight.data, p=2, dim=1) self.norm_vect.weight.data = normalize(self.norm_vect.weight.data, p=2, dim=1) self.rel_emb.weight.data = self.project(self.ent_emb.weight.data, self.norm_vect.weight.data)
For self.rel_emb.weight.data, why is "self.project(self.ent_emb.weight.data,self.norm_vect.weight.data)"? And it shows this bug, during the model initialization phase: RuntimeError: The size of tensor a (14541) must match the size of tensor b (237) at non-singleton dimension 0