How to reconstruct edges from autoencoder?
See original GitHub issueHello,
I was working with the decoder of Autoencoder example, and wonder how to reconstruct a graph with decoder output. If I understood right, the decoder computes edge probabilities, and I got them like below.
tensor([0.6745, 0.6745, 0.6551, 0.6551, 0.6286, 0.6286, 0.6391, 0.6391, 0.5424,
0.5424, 0.5542, 0.5542, 0.5694, 0.5694, 0.5375, 0.5375, 0.4936, 0.4936,
0.6254, 0.6254, 0.5815, 0.5815, 0.6029, 0.6029, 0.5186, 0.5186, 0.4716,
0.4716, 0.5158, 0.5158, 0.5058, 0.5058, 0.5641, 0.5641, 0.4994, 0.4994,
0.5030, 0.5030, 0.6071, 0.6071, 0.6064, 0.6064, 0.5250, 0.5250, 0.5184,
0.5184, 0.5531, 0.5531, 0.5415, 0.5415, 0.5445, 0.5445, 0.5138, 0.5138,
0.5075, 0.5075, 0.4968, 0.4968, 0.5199, 0.5199, 0.4946, 0.4946, 0.5524,
0.5524, 0.5587, 0.5587, 0.5585, 0.5585, 0.5088, 0.5088, 0.4806, 0.4806,
0.5119, 0.5119, 0.5122, 0.5122, 0.5117, 0.5117, 0.5116, 0.5116, 0.5283,
0.5283, 0.5211, 0.5211, 0.5121, 0.5121, 0.5273, 0.5273, 0.5119, 0.5119,
0.5117, 0.5117, 0.4990, 0.4990, 0.4986, 0.4986, 0.5036, 0.5036, 0.5067,
0.5067, 0.4918, 0.4918, 0.4983, 0.4983, 0.5210, 0.5210, 0.5012, 0.5012,
0.5017, 0.5017, 0.5477, 0.5477, 0.5475, 0.5475, 0.4924, 0.4924, 0.5084,
0.5084, 0.5098, 0.5098, 0.5256, 0.5256, 0.5719, 0.5719, 0.5012, 0.5012,
0.5010, 0.5010, 0.5020, 0.5020, 0.5064, 0.5064, 0.5063, 0.5063, 0.5221,
0.5221, 0.6704, 0.6704, 0.5566, 0.5566, 0.6233, 0.6233, 0.5059, 0.5059,
0.5069, 0.5069, 0.5085, 0.5085, 0.5048, 0.5048, 0.5051, 0.5051, 0.5887,
0.5887, 0.6524, 0.6524, 0.5295, 0.5295, 0.5474, 0.5474, 0.5241, 0.5241,
0.5059, 0.5059, 0.5568, 0.5568, 0.5497, 0.5497, 0.5727, 0.5727, 0.5397,
0.5397, 0.5805, 0.5805, 0.5577, 0.5577, 0.5569, 0.5569, 0.6282, 0.6282,
0.6124, 0.6124, 0.6134, 0.6134, 0.5117, 0.5117, 0.4991, 0.4991, 0.5032,
0.5032, 0.6867, 0.6867, 0.6140, 0.6140, 0.6222, 0.6222, 0.6541, 0.6541,
0.6641, 0.6641, 0.7468, 0.7468, 0.7686, 0.7686, 0.6775, 0.6775, 0.7056,
0.7056, 0.7104, 0.7104, 0.5137, 0.5137], grad_fn=<SigmoidBackward>)
of which length is 106. but my original data that I encoded has 212 edges and 117 nodes.
Data(edge_index=[2, 212], x=[117, 1])
How do I know which edge that each probability represents??
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to reconstruct edges from autoencoder? #281 - GitHub
Hello, I was working with the decoder of Autoencoder example, and wonder how to reconstruct a graph with decoder output.
Read more >Autoencoders for Image Reconstruction in Python and Keras
into fairly small bits of data, and then using that representation, reconstruct the original data as closely as it can to the original....
Read more >Facial Reconstruction using Autoencoders | by Iishi Patel
In this article, we will be focusing on how to reconstruct faces from noise containing or damaged images. This is also known as...
Read more >Reconstruction of Compton Edges in Plastic Gamma Spectra ...
In this paper, we propose a method to reconstruct Compton edges in plastic gamma spectra using an artificial neural network for direct ...
Read more >Deep Autoencoder in Action: Reconstructing Handwritten Digit
In this project, the decoder takes two input values, in which it should be two coordinate numbers that represent a location in a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In addition, I highly suggest using the latest autoencoder example (with PyG from master). The old autoencoder had a bug, where test and val edges where not removed in the encoder.
Ah I see, so you are basically just using the autoencoder example with custom data. Actually, the
split_edges
function modifies theedge_index
(and removes contrary edges), so the shapes are look okay to me (212//2=106).