Thank you so much.
One problem. Now when instantiating the model I get the following error in the Heterodotproduct:
TypeError: __init__() missing 1 required positional argument: 'out_feats'
at:
self.pred = HeteroDotProductPredictor()
I have tried the following:
class Model(nn.Module):
def __init__(self, in_features, hidden_features, out_features, rel_names):
super().__init__()
self.sage = RGCN(in_features, hidden_features, out_features, rel_names)
self.pred = HeteroDotProductPredictor(out_feats=out_features)
def forward(self, g, neg_g, x, etype):
h = self.sage(g, x)
return self.pred(g, h, etype), self.pred(neg_g, h, etype)
But I get:
AttributeError: cannot assign module before Module.__init__() call
How should I adapt my model to this?
And please, one last thing I dont understand yet. In the end, how can I use this feats and the new score predictor when computing a pair of nodes similarity for a given edge? I guess all I need now is to extract those link specific embeddings, but how could I do it? I undertand that now every node has 3 different vectors, right? Or how this work this new out_feats?