jax.experimental.host_callback.id_print#
- jax.experimental.host_callback.id_print(arg, *, result=None, tap_with_device=False, device_index=0, output_stream=None, threshold=None, **kwargs)[source]#
Like
id_tap()
with a printing tap function.Experimental: please give feedback, and expect changes!
On each invocation of the printing tap, the
kwargs
if present will be printed first (sorted by keys). Then arg will be printed, with the arrays stringified withnumpy.array2string
.See the
id_tap()
documentation.Additional keyword arguments:
tap_with_device
if True, will print also the device from which the value originates.output_stream
if given then it will be used instead of the built-inprint
. The string will be passed asoutput_stream.write(s)
.threshold
is passed tonumpy.array2string
.
For more details see the
jax.experimental.host_callback
module documentation.