Skip to content

Commit

Permalink
fix gcn_con
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloLucibello committed Jul 28, 2024
1 parent e45fd98 commit ffdb7e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions GNNlib/src/layers/conv.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ function gcn_conv(l, g::AbstractGNNGraph, x, edge_weight::EW, norm_fn::F, conv_w
end

# when we also have edge_weight we need to convert the graph to COO
function gcn_conv(l, g::GNNGraph{<:ADJMAT_T}, x::AbstractMatrix, edge_weight::AbstractVector; kws...)
function gcn_conv(l, g::GNNGraph{<:ADJMAT_T}, x, edge_weight::EW, norm_fn::F, conv_weight::CW) where
{EW <: Union{Nothing, AbstractVector}, CW<:Union{Nothing,AbstractMatrix}, F}
g = GNNGraph(edge_index(g)...; g.num_nodes) # convert to COO
return gcn_conv(l, g, x, edge_weight; kws...)
return gcn_conv(l, g, x, edge_weight, norm_fn, conv_weight)
end

function cheb_conv(l, g::GNNGraph, X::AbstractMatrix{T}) where {T}
Expand Down

0 comments on commit ffdb7e2

Please sign in to comment.