Skip to content

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

Closed
@emsal0

Description

@emsal0

function bypass_graph(nf_func=identity, ef_func=identity, gf_func=identity)
return function (fg::FeaturedGraph)
FeaturedGraph(fg,
nf=nf_func(node_feature(fg)),
ef=ef_func(edge_feature(fg)),
gf=gf_func(global_feature(fg)))
end
end

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions