A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://jax.readthedocs.io/en/latest/_autosummary/jax.device_get.html below:

jax.device_get — JAX documentation

jax.device_get#
jax.device_get(x)[source]#

Transfer x to host.

If x is a pytree, then the individual buffers are copied in parallel.

Parameters:

x (Any) – An array, scalar, Array or (nested) standard Python container thereof representing the array to be transferred to host.

Returns:

An array or (nested) Python container thereof representing the value of x.

Examples

Passing a Array:

>>> import jax
>>> x = jax.numpy.array([1., 2., 3.])
>>> jax.device_get(x)
array([1., 2., 3.], dtype=float32)

Passing a scalar (has no effect):

See also


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.5