Skip to content

Edge features in GCNConv layer #77

Closed
@tdfalc1

Description

@tdfalc1

The FeaturedGraph type permits edge features as well as node features, however Im not too sure how these are then incorporated in the GCNConv layer. Also, what is the recommended structured of the edge features, im assuming a similar structure to a weighted adjacency matrix, but wondering if this is limited to a 1 dimensional feature for each edge, or if a 3 dimension tensor/ channel structure is permitted for multiple edge features?

function (g::GCNConv)(fg::FeaturedGraph)
    X = node_feature(fg)
    A = adjacency_matrix(fg)
    g.fg isa NullGraph || (g.fg.graph[] = A)
    L = normalized_laplacian(A, eltype(X); selfloop=true)
    X_ = g.σ.(g.weight * X * L .+ g.bias)
    FeaturedGraph(A, X_)
end

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