get TypeError: expected str, got BatchTracer when using jax.debug.print #20559
-
I want to print the numerical value of the first batch of the input using jax.debug.print,however I get TypeError: expected str, got BatchTracer. Does anyone know how to achieve this without triggering error?
the following is the report of the error: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The first argument of jx.debug.print("{}", x.value[0]) See the debug.print docs for more examples. |
Beta Was this translation helpful? Give feedback.
The first argument of
jax.debug.print
must be a format string, so for example you could do this:See the debug.print docs for more examples.