vgg-face.pytorch
vgg-face.pytorch copied to clipboard
TypeError: unhashable type: 'numpy.ndarray'
Hi,
I tried following the instructions in the README but unfortunately, I am continuously encountering the following error when trying to load the model (I am on Windows):
Traceback (most recent call last):
File "models/vgg_face.py", line 102, in <module>
model.load_weights()
File "models/vgg_face.py", line 46, in load_weights
model = torchfile.load(path)
File "C:\Users\mayur\AppData\Local\Programs\Python\Python36\lib\site-packages\torchfile.py", line 424, in load
return reader.read_obj()
File "C:\Users\mayur\AppData\Local\Programs\Python\Python36\lib\site-packages\torchfile.py", line 370, in read_obj
obj._obj = self.read_obj()
File "C:\Users\mayur\AppData\Local\Programs\Python\Python36\lib\site-packages\torchfile.py", line 387, in read_obj
obj[k] = v
TypeError: unhashable type: 'numpy.ndarray'
Any assistance would be highly appreciated.
Thanks.
Thank you Andrew! Will be back from long weekend on monday so I could get back to details :-)
char and int functions were created to return two types of data which is more convenient to the user (i.e. int for automation code, char for storage).
if there is csw function then this is also created for convenience or to mark specific behavior using csw. i am sure you can do the same without this csw function but with more manual work.
Will get back to you with details next week! :-)
Sure thing, enjoy your long weekend. Let's chat next week.
I think if you want an _int function, it should just call the relevant _char function, to minimise code duplication. What we need to define is what it should do, since as I mentioned it seems to be different depending on auto and manual tar increment. I could set up a test to prove that, but ...
As for the CSW stuff, I think it's worthwhile merging those with the default functions, since it's possible users could make a mistake by assuming CSW will already be set to x when actually it's set up as y. I think being explicit per transfer makes sense here. Then adding some comments to the function declarations that say how and when to use each option.
Andy
ACK :-)