EOFError: Ran out of input when I load pretrained vggface2 via InceptionResnetV1

username: ishanarya14
cooked: <p>Hi <a class="mention" href="/u/ptrblck">@ptrblck</a> ,<br>
I am trying to load pretrained vggface2 model via the following command:</p>
<pre><code class="lang-auto"> from facenet_pytorch import  InceptionResnetV1
 resnet = InceptionResnetV1(pretrained='vggface2').eval()
</code></pre>
<p>and I get the following error:</p>
<pre><code class="lang-auto">---------------------------------------------------------------------------
EOFError                                  Traceback (most recent call last)
&lt;ipython-input-4-bec9f4ede2ac&gt; in &lt;module&gt;
----&gt; 1 resnet = InceptionResnetV1(pretrained='vggface2').eval()

c:\users\iarya\anaconda3\envs\opencv-env\lib\site-packages\facenet_pytorch\models\inception_resnet_v1.py in __init__(self, pretrained, classify, num_classes, dropout_prob, device)
    259 
    260         if pretrained is not None:
--&gt; 261             load_weights(self, pretrained)
    262 
    263         if self.num_classes is not None:

c:\users\iarya\anaconda3\envs\opencv-env\lib\site-packages\facenet_pytorch\models\inception_resnet_v1.py in load_weights(mdl, name)
    334             with open(cached_file, 'wb') as f:
    335                 f.write(r.content)
--&gt; 336         state_dict.update(torch.load(cached_file))
    337 
    338     mdl.load_state_dict(state_dict)

c:\users\iarya\anaconda3\envs\opencv-env\lib\site-packages\torch\serialization.py in load(f, map_location, pickle_module, **pickle_load_args)
    591                     return torch.jit.load(f)
    592                 return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
--&gt; 593         return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
    594 
    595 

c:\users\iarya\anaconda3\envs\opencv-env\lib\site-packages\torch\serialization.py in _legacy_load(f, map_location, pickle_module, **pickle_load_args)
    761             "functionality.".format(type(f)))
    762 
--&gt; 763     magic_number = pickle_module.load(f, **pickle_load_args)
    764     if magic_number != MAGIC_NUMBER:
    765         raise RuntimeError("Invalid magic number; corrupt file?")

EOFError: Ran out of input
</code></pre>
<p>Can anyone provide the solution please?</p>
<p>Thanks</p>

username: ptrblck
cooked: <p>This error is raised by <code>pickle</code>, if the file is empty or is parts are missing.<br>
Could you check the file size?</p>

username: ishanarya14
cooked: <p>Hey <a class="mention" href="/u/ptrblck">@ptrblck</a>,</p>
<p>The files are present at these links:</p>
<p><a href="https://drive.google.com/uc?export=download&amp;id=1cWLH_hPns8kSfMz9kKl9PsG5aNV2VSMn" rel="nofollow noopener">https://drive.google.com/uc?export=download&amp;id=1cWLH_hPns8kSfMz9kKl9PsG5aNV2VSMn</a></p>
<p><a href="https://drive.google.com/uc?export=download&amp;id=1mAie3nzZeno9UIzFXvmVZrDG3kwML46X" rel="nofollow noopener">https://drive.google.com/uc?export=download&amp;id=1mAie3nzZeno9UIzFXvmVZrDG3kwML46X</a></p>
<p>They both are downloadable and non empty when downloaded separately</p>
<p>I am following the exact steps as mentioned on :<br>
<a href="https://pypi.org/project/facenet-pytorch/" rel="nofollow noopener">https://pypi.org/project/facenet-pytorch/</a></p>

username: devilishruby
cooked: <p>Could you manage to fix the issue? I am running into the same problem.</p>