chainer.cuda.to_cpu

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

Copies the given GPU array to host CPU.

Parameters:
Returns:

Array on CPU.

If some of the arrays are already on CPU, then this function just returns those arrays without performing any copy.

If input arrays include None, it is returned as None as is.

Return type:

numpy.ndarray, list or tuple