Run GPU code only on CPU: How to get rid of gpuArray data?
    4 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Prb
 el 14 de Mayo de 2019
  
    
    
    
    
    Comentada: Prb
 el 15 de Mayo de 2019
            Hi I have this piece of deep learning code which runs on GPU. I wish not to use GPU. How can I change the code to run only on CPU or just to use it as Array.
eg:
B_forward = gpuArray(X_test(:,:,:,ThisInds));
if size(Residuals,1) > size(B_forward,1)
              NewRes = int8(zeros(size(B_forward),'gpuArray'));
end
 if Shifts(WeightLayerIndex) ~= 0
              B_forward = gpuArray(bitshift(gather(B_forward),Shifts(WeightLayerIndex)));
end
0 comentarios
Respuesta aceptada
  Walter Roberson
      
      
 el 14 de Mayo de 2019
        B_forward = (X_test(:,:,:,ThisInds));
if size(Residuals,1) > size(B_forward,1)
              NewRes = int8(zeros(size(B_forward)));
end
 if Shifts(WeightLayerIndex) ~= 0
              B_forward = (bitshift((B_forward),Shifts(WeightLayerIndex)));
end
Más respuestas (0)
Ver también
Categorías
				Más información sobre GPU Computing en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

