Is "eachslice" not defined for KnetArrays?

11 views
Skip to first unread message

Sinan Cem Yücel

unread,
Nov 6, 2021, 4:26:12 PM11/6/21
to com...@ku.edu.tr

Hi,

 

I got this error:

 
MethodError: no method matching eachslice(::KnetArray{Float32, 3}; dims=2)

 

Is “eachslice” not defined for KnetArrays? Am I missing something? Is there a good alternative? Should I just loop over the tensor with a for?

ILKER KESEN

unread,
Nov 7, 2021, 5:25:38 AM11/7/21
to Sinan Cem Yücel, COMP541
Sinan hi,

Can you share a minimum working example? It will make things easier for us to help you. Knet support for multidimensional arrays is limited, so you can't use all operations, but we can still perform those operations with some tricks.


Best.
- ilker

--
You received this message because you are subscribed to the Google Groups "COMP541" group.
To unsubscribe from this group and stop receiving emails from it, send an email to COMP541+u...@ku.edu.tr.
To view this discussion on the web visit https://groups.google.com/a/ku.edu.tr/d/msgid/COMP541/C924141A-CD45-4EB7-8CCE-ED8C05C6A297%40hxcore.ol.

Deniz Yuret

unread,
Nov 7, 2021, 6:18:47 AM11/7/21
to ILKER KESEN, COMP541, Sinan Cem Yücel
I can also add that CuArray supports a lot more operations than KnetArrays, and should be used instead unless there is a pressing reason otherwise.

Reply all
Reply to author
Forward
0 new messages