FluxML / GeometricFlux.jl

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

deprecate FeatureSelector #207

Closed CarloLucibello closed 3 years ago

CarloLucibello commented 3 years ago

It seems that there is not much need for FeatureSelector, since

feature = :node
model = Flux.Chain(
    GCNConv(1024=>256, relu),
    FeatureSelector(feature),
    softmax
)

can be easily done with

model = Flux.Chain(
    GCNConv(1024=>256, relu),
    node_feature,  # or edge_feature or global_feature
    softmax
)

More complex behavior can be implemente with closures, e.g.

model = Flux.Chain(
    GCNConv(1024=>256, relu),
    fg -> (node_feature(fg), edge_feature(fg))
    (x, e) -> (softmax(x), sigmoid.(e))
)
yuehhua commented 3 years ago

I agree with using node_feature, since I saw someone else used it before. It is worth documentation.