Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: unhashable type: 'numpy.ndarray' #4

Open
Mayur28 opened this issue Aug 21, 2021 · 6 comments
Open

TypeError: unhashable type: 'numpy.ndarray' #4

Mayur28 opened this issue Aug 21, 2021 · 6 comments

Comments

@Mayur28
Copy link

Mayur28 commented Aug 21, 2021

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.

@prlz77
Copy link
Owner

prlz77 commented Aug 23, 2021

Hi @Mayur28,

Unfortunately I do not have access to a windows machine right now but I just tried on linux with python 3.8.5 and pytorch 1.9 and it works correctly.

I suggest asking to the pytorch windows community and please let me know if you solve it!

@DeathSprout
Copy link

Hi @Mayur28,

I have the same problem as you(on windows),and I try to use other repo as PyVGGFace and convert_torch_to_pytorch.
For the same reason failed.

If you solve the problem now, please let me know.
Any assistance would be highly appreciated.

Thanks.

@Mayur28
Copy link
Author

Mayur28 commented Oct 27, 2021

Hi @DeathSprout,

I was able to resolve the issue, although, considering that this happened a while back, I cannot remember what did I do to resolve the issue. As soon as I have a few spare moments, I will look into it again and let you know what did I do to resolve the issue.

Apologies.

@DeathSprout
Copy link

Hi @Mayur28 ,

thanks , I used this vgg-face.pytorch in the Ubuntu subsystem as prLz77 said , it works well.
Maybe I'll give it a try before @ you.

Thanks for your answer.

@sdulyq
Copy link

sdulyq commented Nov 23, 2021

I alse meet this problem, but when I use it in Ubuntu it works fine.

@prlz77
Copy link
Owner

prlz77 commented Nov 23, 2021

@Mayur28 let us know if you remember how to fix it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants