From cad8cc05b0a26367a6d6d856c573ab7ecc125434 Mon Sep 17 00:00:00 2001 From: Anant Thazhemadam Date: Tue, 12 Oct 2021 19:03:38 +0530 Subject: [PATCH] try to use eigenpooling as the global pooling mechanism Signed-off-by: Anant Thazhemadam --- src/layers/pool/eigenpool.jl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/layers/pool/eigenpool.jl b/src/layers/pool/eigenpool.jl index c4d18c4..1c32cdc 100644 --- a/src/layers/pool/eigenpool.jl +++ b/src/layers/pool/eigenpool.jl @@ -22,8 +22,9 @@ struct EigenPool end end -function eigen_pooling(graph::Matrix{<:Real}, features::Matrix{<:Real}) - L = Atoms.normalized_laplacian(graph) # get the laplacian matrix +# here, L is the laplacian matrix +# this probably needs to be optimized. +function eigen_pooling(L::Matrix{<:Real}, features::Matrix{<:Real}) L_eigen_vectors = eigvecs(L) # find eigen vectors for L result = Vector() @@ -33,7 +34,8 @@ function eigen_pooling(graph::Matrix{<:Real}, features::Matrix{<:Real}) end # using an agreeable H and then return H elements of result hcatt-ed into a single 1xdH vector - + result = hcat(result...)' + reshape(result, length(result), 1) # return it as a dHx1 Matrix end #=