Easiest way to compress output/input of torch.save / torch.load?

1,056 views
Skip to first unread message

Hugh Perkins

unread,
May 5, 2016, 10:33:34 AM5/5/16
to torch7
Easiest way to compress output/input of torch.save / torch.load?

I'm being lazy by asking really probably :-)  In the absence of additional information, I'll probaly do something like:

torch.save('foo.t7', mynet)
sys.execute('gzip foo.t7')

... for writing

and:

sys.execute('cat foo.t7.gz | gunzip > foo.t7')
mynet = torch.load('foo.t7')
sys.execute('rm foo.t7')

... for reading

... but wondering whether I can use some kind of memory object to avoid the temporary file?

Sergey Zagoruyko

unread,
May 5, 2016, 10:39:17 AM5/5/16
to torch7 on behalf of Hugh Perkins
There is zlib https://github.com/jonathantompson/torchzlib
--
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.
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.


--
С уважением,
Сергей Загоруйко

Hugh Perkins

unread,
May 6, 2016, 8:04:15 AM5/6/16
to torch7
Thanks!  will take a look
Reply all
Reply to author
Forward
0 new messages