{
1 : "Hello"
2 : "World"
3 : "!"
}
table: 0x7fb03d82b400
try this
> a = {[1]=torch.Tensor()}
> require('trepl')
> print(a)
{
1 : DoubleTensor - empty
}
--
You received this message because you are subscribed to the Google Groups "torch7" group.
To unsubscribe from this group and stop receiving emails from it, send an email to torch7+unsubscribe@googlegroups.com.
To post to this group, send email to tor...@googlegroups.com.
Visit this group at https://groups.google.com/group/torch7.
For more options, visit https://groups.google.com/d/optout.
try this
> a = {[1]=torch.Tensor()} > require('trepl') > print(a) { 1 : DoubleTensor - empty }
On Mon, Jan 16, 2017 at 10:10 PM, Fabrice Dugas via torch7 <torch7+APn2wQfyAxnGvWBMd2y7nmoS9LJ3oK1EYTTwIglD-Sc8lBp8mi-0FmC7y@googlegroups.com> wrote:
Hi there, small question out of curiosity.I have been trying to figure out where Torch's fancy printing happens. For example, tables in torch are print like so:
{
1 : "Hello"
2 : "World"
3 : "!"
}Instead of:
table: 0x7fb03d82b400Which is the result of tostring.Why is it different? Is there a way to get a string instead of printing?Fabrice
--
You received this message because you are subscribed to the Google Groups "torch7" group.
To unsubscribe from this group and stop receiving emails from it, send an email to torch7+un...@googlegroups.com.