Skip to content

Instantly share code, notes, and snippets.

@szagoruyko
Created September 10, 2016 00:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save szagoruyko/53e78b51436b690c6e188f71d004ff39 to your computer and use it in GitHub Desktop.
Save szagoruyko/53e78b51436b690c6e188f71d004ff39 to your computer and use it in GitHub Desktop.
diff --git a/torchfile.py b/torchfile.py
index cba1145..61fea4a 100644
--- a/torchfile.py
+++ b/torchfile.py
@@ -378,6 +378,16 @@ class T7Reader:
obj = lst
self.objects[index] = obj
return obj
+ elif typeidx >= 50:
+ size = typeidx
+ print size
+ obj = hashable_uniq_dict()
+ for i in range(size):
+ k = self.read_obj()
+ v = self.read_obj()
+ print k,v
+ # obj[k] = v
+ return obj
else:
raise T7ReaderException("unknown object")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment