Make line wrapping and precision of tf.print configurable. #52960
Labels
2.6.0
comp:ops
OPs related issues
stat:awaiting tensorflower
Status - Awaiting response from tensorflower
type:feature
Feature requests
Please make sure that this is a feature request. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:feature_template
System information
Describe the feature and the current behavior/state.
tf.print() wraps past the 4th element for me. Output from printing an (N, 7, 7), where N=2 in this case, looks like this:
I work a lot with these fixed-sized matrices (eg: 7x7, or 9x9). Debugging those is hard with line wrapping.
I'd like to get them all 7 elements of the matrix row on one line, at least. Additionally, I would fancy having less precision, as that is not that informative to debug.
Will this change the current api? How?
Either have like numpy a
set_print_options()
, or have extra arguments to tf.print along the lines ofline_length=None
(where None means "no wrapping at all") andformat="%12.7e"
where I could specify for exampleformat="%10.4f"
.I am slightly in favor of the custom options per
tf.print()
call to allow granular control.Who will benefit with this feature?
Most likely anyone debugging stuff with matrices.
The text was updated successfully, but these errors were encountered: