bshillingford / python-torchfile

Deserialize Lua torch-serialized objects from Python
BSD 3-Clause "New" or "Revised" License
216 stars 25 forks source link

version.partition is a floating point number #5

Closed clementfarabet closed 7 years ago

clementfarabet commented 7 years ago

Getting an error at this line, when running:

torch.save('/tmp/test.t7', {hello=123, world=torch.rand(1,2,3)})
o = torchfile.load('/tmp/test.t7')
ValueError: invalid literal for int() with base 10: b'1.0'

The version in my test.t7 file is "V 1.0".

This is with Python 2.7 or 3.5, and Lua 5.3.

clementfarabet commented 7 years ago

Fixing here.

bshillingford commented 7 years ago

Thank you!