Convert GPUArray back to regular array?

Hi,
I have some functions which I can use with an image when it is in GPUArray, other functions I have won't work with GPUArrays, how can I convert a GPUArray back into a regular array?
Many thanks

 Risposta accettata

Adam
Adam il 22 Giu 2017
Modificato: Adam il 22 Giu 2017
doc gather
Make sure you select the one for the parallel computing toolbox though rather than tall arrays

3 Commenti

Hi I have the similar question. Could you please explain how can do with this line of code
if Shifts(WeightLayerIndex) ~= 0
B_forward = gpuArray(bitshift(gather(B_forward),Shifts(WeightLayerIndex)));
If you need to use that without a GPU, then it would be
B_forward = (bitshift((B_forward),Shifts(WeightLayerIndex)));
Thanks a lot

Accedi per commentare.

Più risposte (0)

Richiesto:

il 22 Giu 2017

Commentato:

Prb
il 14 Mag 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by