I also ran into the same problem but even after downloading the weights file and placing it inthe appropriate directory and unzipping it i am still getting this error
FileNotFoundError: [Errno 2] No such file or directory: ‘C:\Users\khwaja wisal\Anaconda3\lib\site-packages\fastai/weights/resnext_101_64x4d.pth’
please help.
This is happening with any architecture i use i am getting this same error
FileNotFoundError Traceback (most recent call last)
in
----> 1 learn = ConvLearner.pretrained(arch, data, precompute=True)
~\Anaconda3\lib\site-packages\fastai\conv_learner.py in pretrained(cls, f, data, ps, xtra_fc, xtra_cut, custom_head, precompute, pretrained, **kwargs)
111 pretrained=True, **kwargs):
112 models = ConvnetBuilder(f, data.c, data.is_multi, data.is_reg,
–> 113 ps=ps, xtra_fc=xtra_fc, xtra_cut=xtra_cut, custom_head=custom_head, pretrained=pretrained)
114 return cls(data, models, precompute, **kwargs)
115
~\Anaconda3\lib\site-packages\fastai\conv_learner.py in init(self, f, c, is_multi, is_reg, ps, xtra_fc, xtra_cut, custom_head, pretrained)
38 else: cut,self.lr_cut = 0,0
39 cut-=xtra_cut
—> 40 layers = cut_model(f(pretrained), cut)
41 self.nf = model_features[f] if f in model_features else (num_features(layers)*2)
42 if not custom_head: layers += [AdaptiveConcatPool2d(), Flatten()]
~\Anaconda3\lib\site-packages\fastai\torch_imports.py in resnext50(pre)
54 @_fastai_model(‘ResNeXt 50’, ‘Aggregated Residual Transformations for Deep Neural Networks’,
55 ‘https://arxiv.org/abs/1611.05431’)
—> 56 def resnext50(pre): return load_pre(pre, resnext_50_32x4d, ‘resnext_50_32x4d’)
57
58 @_fastai_model(‘ResNeXt 101_32’, ‘Aggregated Residual Transformations for Deep Neural Networks’,
~\Anaconda3\lib\site-packages\fastai\torch_imports.py in load_pre(pre, f, fn)
30 m = f()
31 path = os.path.dirname(file)
—> 32 if pre: load_model(m, f’{path}/weights/{fn}.pth’)
33 return m
34
~\Anaconda3\lib\site-packages\fastai\torch_imports.py in load_model(m, p)
25 def children(m): return m if isinstance(m, (list, tuple)) else list(m.children())
26 def save_model(m, p): torch.save(m.state_dict(), p)
—> 27 def load_model(m, p): m.load_state_dict(torch.load(p, map_location=lambda storage, loc: storage))
28
29 def load_pre(pre, f, fn):
~\Anaconda3\lib\site-packages\torch\serialization.py in load(f, map_location, pickle_module)
263 (sys.version_info[0] == 3 and isinstance(f, pathlib.Path)):
264 new_fd = True
–> 265 f = open(f, ‘rb’)
266 try:
267 return _load(f, map_location, pickle_module)
FileNotFoundError: [Errno 2] No such file or directory: ‘C:\Users\khwaja wisal\Anaconda3\lib\site-packages\fastai/weights/resnext_50_32x4d.pth’