chainer.cuda.to_cpu

chainer.cuda.to_cpu(array, stream=None)[source]

Copies the given GPU array to host CPU.

Parameters:
  • array – Array to be sent to CPU.
  • stream (cupy.cuda.Stream) – CUDA stream.
Returns:

Array on CPU.

If given array is already on CPU, then this function just returns array without performing any copy.

Return type:

numpy.ndarray