Deserialize torch-serialized objects from Python.
copied from cf-staging / torchfileMostly direct port of the torch7 Lua and C serialization implementation to Python, depending only on numpy (and the standard library: array and struct). Sharing of objects including torch.Tensors is preserved.