How to extract embedding from unsupervised GraphSage model?

Hello, I’m new to DGL.

I ran the unsupervised GraphSage implementation and I wanted to extract the the hidden representations after the last epoch.

Is there any code example to extract hidden representations for each input node? (I’m new to PyTorch >_<).

Thanks!

I think you just need to take the output of the inference layer here. To save pytorch tensors, this post might help.

Your answer is incredibly helpful! Thx!