GeometricFlux.jl icon indicating copy to clipboard operation
GeometricFlux.jl copied to clipboard

Support for TopK Unpool

Open DeanLym opened this issue 4 years ago • 2 comments

First of all, thank you so much for the great work!

I am wondering if there is support for the "gUnpool" layer mentioned in this paper Graph U-Nets. Thank you!

DeanLym avatar Jul 22 '20 21:07 DeanLym

Another question regarding unpooling using the "inverse" of LocalPool.

Say I have an input data x of dim NumChannel x NumNode, and y = LocalPool(:mean, cluster)(x)

Then I try to unpool using x[:, cluster]

This works fine on cpu.

But on gpu, if cluster is a of type Array{Int64, 1} (on cpu), AD with Zygote fails. If cluster is a cuArray, then Zygote works, but it becomes extremely slow.

Any suggestions?

Thank you so much!

DeanLym avatar Jul 23 '20 08:07 DeanLym

I reply the second question first. Due to the architecture of GPU, it is suitable for array operations, instead of scalar operations. Scalar operations are inherently slow on GPU, because it is not designed for scalar operations. Maybe design a kernel for specific operation can help.

yuehhua avatar Jul 29 '20 05:07 yuehhua