Created
September 10, 2016 00:41
-
-
Save szagoruyko/53e78b51436b690c6e188f71d004ff39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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