python-torchfile
python-torchfile copied to clipboard
torchfile.T7ReaderException: unknown object type / typeidx: 1936876918
When I was trying to read the t7 file in my docker (Ubuntu) vm, I encountered this error which doesn't show up when I run the same code on both my computer and colab.
This is the code that raise the error:
t7 = torchfile.load('./wct_models/vgg_normalised_conv5_1.t7',force_8bytes_long=True)
It should be reading out as a dict but somehow torchfile couldn't recognise it when it is running on docker. I have tried it on both python 3.6 and 3.7, both raise the same error.
the t7 files are from here: https://drive.google.com/file/d/1M5KBPfqrIUZqrBZf78CIxLrMUT4lD4t9/view
Any idea what can be done to solve it? Thank you.
File "/src/WCT_Function.py", line 508, in encoder5_1 t7 = torchfile.load('./wct_models/vgg_normalised_conv5_1.t7',force_8bytes_long=True) File "/usr/local/lib/python3.7/site-packages/torchfile.py", line 424, in load return reader.read_obj() File "/usr/local/lib/python3.7/site-packages/torchfile.py", line 414, in read_obj "unknown object type / typeidx: {}".format(typeidx)) torchfile.T7ReaderException: unknown object type / typeidx: 1936876918