In the code that defines rgcn hidden layer in the tutorial:
if self.is_input_layer:
def message_func(edges):
# for input layer, matrix multiply can be converted to be
# an embedding lookup using source node id
embed = weight.view(-1, self.out_feat)
index = edges.data[‘rel_type’] * self.in_feat + edges.src[‘id’]
return {'msg': embed[index] * edges.data['norm']}
Error occurred:
index = edges.data[‘rel_type’] * self.in_feat + edges.src[‘id’]
RuntimeError: expected backend CPU and dtype Long but got backend CPU and dtype Int
How to modify it?