Thanks. Changing the self.weight.long() to self.weight and also changing adj = torch.randint(high=10, size=(100,100)).long() to adj = torch.randint(high=10, size=(100,100)).float() and
features = torch.sum(adj, dim=1).view(1,-1).long() to features = torch.sum(adj, dim=1).view(1,-1).float() and also adj_comp= torch.randint(high=10, size=(100,)).long() to adj_comp= torch.randint(high=10, size=(100,)).float() did the trick.
That should do it, right? Thanks a lot for you help and time.