Closed janheinrichmerker closed 3 years ago
It looks like your index array is not on GPU. All arrays need to be moved to GPU with CUDA.cu
before doing any computation.
Thanks a lot! I had accidentially used the onehot
function from Flux.jl. It was fixed after using the onehot
implementation from Transformers.jl.
Still quite new to machine learning in Julia and the whole GPU stuff is a bit confusing to me :smile:
I use this fantastic library for a small study in university. Now, when I use a trainable embedding on the GPU, i get the following error:
I'm using Transformers 0.1.7 with Flux 0.11.1 on Julia 1.5.3. It seems like the
∇gather
function does not work withCuArray
s (it also says the function is for CPU):https://github.com/chengchingwen/Transformers.jl/blob/e7e7b74e2c1fd20656b603b644b8a8e1b99ef3ea/src/basic/embeds/gather.jl#L38-L43
Any help is highly appreciated! :+1: