FluxML / GeometricFlux.jl

Geometric Deep Learning for Flux
https://fluxml.ai/GeometricFlux.jl/stable/
MIT License
348 stars 30 forks source link

How do you use `bypass_graph` with a `Flux.Chain`? #248

Closed emsal0 closed 2 years ago

emsal0 commented 2 years ago

https://github.com/FluxML/GeometricFlux.jl/blob/c8396e4a34637c06c5c479851877c44e1a85a530/src/layers/misc.jl#L6-L13

Say I want to use a Flux.Chain to apply a neural network to each node feature vector. I don't think I can just pass in the Chain here, because it will be applied to the whole node feature matrix, which a) doesn't separate the node features and b) might be of variable size. Should the functionality of bypass_graph be changed so that it applies a mapping over node feature vectors instead?

yuehhua commented 2 years ago

The bypass_graph is designed to pass node/edge/global features over distinct networks. You want to pass each node features over a neural network. I am curious what is the difference between passing node features one by one and passing whole node features as a matrix? Computationally, it should be the same and we don't need to separate node features for that.

yuehhua commented 2 years ago

In the latest version, bypass_graph has been deprecated. The functionality is replaced by GraphParallel layer.