Printing all columns of a tensor

Hi,
I have a 200 X 200 matrix stored in a tensor and I want to print all the rows and columns. When I use cout or output to file using “<<”, I get outputs in sets of 6 columns. That is all 200 rows of the columns 1-6 are printed, followed by all 200 rows of the columns 7-12 are printed and so on.

Is it possible to have all 200 columns printed in one shot so I could easily visualize the matrix?

thanks,
Sushmita

You could try to call directly std::ostream& print(std::ostream& stream, const Tensor & tensor_, int64_t linesize) with the specified linesize argument.

1 Like

thank you, that worked! It would be nice to know upfront what linesize should be for different sized tensors. But setting it to a big number works.