jean-marc:

self.adj_mx = self.adj_mx * self.adj_mx_mask


This seems dubious, as it replaces the parameter(?) self.adj_mx with the multiplied version.
As a rule of thumb, assigning things in forward is unlikely to be the right thing to do.
Best regards
Thomas