PRINT function with control of levels to print
carltonchu1 opened this issue · comments
The new print function prints the contents of the table in multiple depth. But sometimes the information it prints out is too much, and I would like to use the old print function sometimes. It will be great if the level of details to be printed can be selected.
Yeah, I agree, but I don't have a good idea on how to deal with that. print() is already quite overloaded. Do you havea an idea on how to do this cleanly?
How about we add a function like torch.setprintlevel(n).
n=0 gives the standard lua print
n=4 is default is gives the current behaviour of at most 4 nested tables.
...
Is this acceptable?
Yeah that could work nicely actually... From memory, I think I'm using a max level already, which is probably hard coded to 4 :-).
OK, I'll that tomorrow.
I pushed a modification that adds setprintlevel(n) function. For n=0, the print function returns to original lua print function.
Cool and the default is still the same?
On Thu, May 23, 2013 at 12:19 PM, koray kavukcuoglu
notifications@github.com wrote:
I pushed a modification that adds setprintlevel(n) function. For n=0, the print function returns to original lua print function.
Reply to this email directly or view it on GitHub:
#126 (comment)
yep, it is n=5 case.
Great!, thanks for doing this.
Clément
On Thursday, May 23, 2013 at 12:34 PM, koray kavukcuoglu wrote:
yep, it is n=5 case.
—
Reply to this email directly or view it on GitHub (#126 (comment)).