zfjsail / gae-pytorch

Graph Auto-Encoder in PyTorch
MIT License
417 stars 79 forks source link

should use encode() to get hidden_emb #6

Open li-yang23 opened 3 years ago

li-yang23 commented 3 years ago

I found that in train.py mu.data.numpy() is used to get hidden_emb, but it would get None when using GCNModelAE as model, hidden_emb should be got from model.encode() instead.

GlancerZ commented 3 years ago

In the model.py, mu was defined by logvar = self.encode(x, adj) , after defined recovered, mu, logvar = model(features, adj_norm) in train.py, you can easily get embedding with mu.data.numpy().