keras-gcn icon indicating copy to clipboard operation
keras-gcn copied to clipboard

Cannot use GPU when output.shape[1] * nnz(a) > 2^31

Open ahukui opened this issue 5 years ago • 10 comments

When I use the gcn layer, I always meets this problem.

InvalidArgumentError: 2 root error(s) found. (0) Invalid argument: Cannot use GPU when output.shape[1] * nnz(a) > 2^31 [[node graph_convolution_23/SparseTensorDenseMatMul/SparseTensorDenseMatMul (defined at /home/labadmin/anaconda2/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py:1083) ]] [[loss_3/add_2/_677]] (1) Invalid argument: Cannot use GPU when output.shape[1] * nnz(a) > 2^31 [[node graph_convolution_23/SparseTensorDenseMatMul/SparseTensorDenseMatMul (defined at /home/labadmin/anaconda2/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py:1083) ]] 0 successful operations. 0 derived errors ignored.

ahukui avatar Aug 28 '19 00:08 ahukui

I meet this problem too !

zhouchunpong avatar Dec 05 '19 13:12 zhouchunpong

hello, do you solve it? can you share your method? thanks

cquzys avatar Dec 14 '19 03:12 cquzys

No

ahukui avatar Dec 16 '19 08:12 ahukui

You can run your code on CPU.

------------------ 原始邮件 ------------------ 发件人: "Horace"<[email protected]>; 发送时间: 2019年12月14日(星期六) 中午11:06 收件人: "tkipf/keras-gcn"<[email protected]>; 抄送: "kui"<[email protected]>;"Author"<[email protected]>; 主题: Re: [tkipf/keras-gcn] Cannot use GPU when output.shape[1] * nnz(a) > 2^31 (#51)

hello, do you solve it? can you share your method? thanks

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

ahukui avatar Dec 18 '19 02:12 ahukui

Is there any solution on this issue?

innekemayachita avatar Apr 08 '21 10:04 innekemayachita

@innekemayachita Have you found anything maybe?

icoric4 avatar Apr 16 '21 08:04 icoric4

You can cast the sparse matrix to dense matrix and use tf.matmul

YingtongDou avatar May 27 '21 19:05 YingtongDou

Same problem here.

b3326023 avatar Jun 22 '21 16:06 b3326023

You can cast the sparse matrix to dense matrix and use tf.matmul

But if we have a large matrix with most of zero, we would like to use sparse matrix, so shouldn't cast to dense matrix

b3326023 avatar Jun 22 '21 16:06 b3326023

I had this problem on tensorflow 2.4.1, it went away when I upgraded to 2.5 + cuda lib v11; I don't know if the trouble was with the tensorflow version, cuda, or both.

krobasky avatar Jul 25 '21 13:07 krobasky