A bug when load vggface to pytorch

As the pictures show, I used pytorch to load vgg_face. But it appeared error.

I switch a package to load vggface. It can handle t7 format file. But it aslo did’t wrok.
The error message is as follows:

Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\qu199\AppData\Local\Programs\Python\Python37\lib\site-packages\torchfile.py”, line 424, in load
return reader.read_obj()
File “C:\Users\qu199\AppData\Local\Programs\Python\Python37\lib\site-packages\torchfile.py”, line 370, in read_obj
obj._obj = self.read_obj()
File “C:\Users\qu199\AppData\Local\Programs\Python\Python37\lib\site-packages\torchfile.py”, line 387, in read_obj
obj[k] = v
TypeError: unhashable type: ‘numpy.ndarray’

I download the vggface file from the website https://www.robots.ox.ac.uk/~vgg/software/vgg_face/ .

I wonder if the version of pytorch lead to the bugs. I am use the latest edition.

Can someone help me ?

It looks like you are trying to load a Torch7 model.
Note that Torch7 is not under active development anymore and I would recommend to switch to PyTorch.
There should be a few vggface-pytorch repos on GitHub. :wink:

1 Like