CarloLucibello / GraphNeuralNetworks.jl

Graph Neural Networks in Julia
https://carlolucibello.github.io/GraphNeuralNetworks.jl/dev/
MIT License
209 stars 47 forks source link

refinement: Self loops for HeteroGraph returns g instead of error if src != tgt #373

Closed askorupka closed 5 months ago

askorupka commented 5 months ago

This PR changes self loops for HeteroGraph to return g instead of throwing error if src != tgt, as in reality in that case graph doesn't change. This refinement would allow us avoid trycatches or similar mechanism when dealing with conv layers for heterographs. Also, this unblocks https://github.com/CarloLucibello/GraphNeuralNetworks.jl/pull/367

CarloLucibello commented 5 months ago

this should be documented and tested

askorupka commented 5 months ago

@CarloLucibello ready for your :eyes: