Sorry if this is an obvious one but I’m totally stuck!
I’m working through the Dog Breeds model and all is working fine until I set learn.precompute=False.
After this every time I try to run anything like learn.fit or the learning rate finder I get the error below…
Any help much appreciated!
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-81-dc56ef6c6740> in <module>()
----> 1 learn.fit(lr, 5, cycle_len=1)
~/fastai/courses/dl1/fastai/learner.py in fit(self, lrs, n_cycle, wds, **kwargs)
223 self.sched = None
224 layer_opt = self.get_layer_opt(lrs, wds)
--> 225 return self.fit_gen(self.model, self.data, layer_opt, n_cycle, **kwargs)
226
227 def warm_up(self, lr, wds=None):
~/fastai/courses/dl1/fastai/learner.py in fit_gen(self, model, data, layer_opt, n_cycle, cycle_len, cycle_mult, cycle_save_name, best_save_name, use_clr, metrics, callbacks, use_wd_sched, norm_wds, wds_sched_mult, **kwargs)
170 n_epoch = sum_geom(cycle_len if cycle_len else 1, cycle_mult, n_cycle)
171 return fit(model, data, n_epoch, layer_opt.opt, self.crit,
--> 172 metrics=metrics, callbacks=callbacks, reg_fn=self.reg_fn, clip=self.clip, **kwargs)
173
174 def get_layer_groups(self): return self.models.get_layer_groups()
~/fastai/courses/dl1/fastai/model.py in fit(model, data, epochs, opt, crit, metrics, callbacks, stepper, **kwargs)
91 t = tqdm(iter(data.trn_dl), leave=False, total=num_batch)
92 i = 0
---> 93 for (*x,y) in t:
94 batch_num += 1
95 for cb in callbacks: cb.on_batch_begin()
~/anaconda3/envs/fastai/lib/python3.6/site-packages/tqdm/_tqdm.py in __iter__(self)
895 """, fp_write=getattr(self.fp, 'write', sys.stderr.write))
896
--> 897 for obj in iterable:
898 yield obj
899 # Update and possibly print the progressbar.
~/fastai/courses/dl1/fastai/dataloader.py in __iter__(self)
82 # avoid py3.6 issue where queue is infinite and can result in memory exhaustion
83 for c in chunk_iter(iter(self.batch_sampler), self.num_workers*10):
---> 84 for batch in e.map(self.get_batch, c): yield get_tensor(batch, self.pin_memory)
85
~/anaconda3/envs/fastai/lib/python3.6/concurrent/futures/_base.py in result_iterator()
584 # Careful not to keep a reference to the popped future
585 if timeout is None:
--> 586 yield fs.pop().result()
587 else:
588 yield fs.pop().result(end_time - time.time())
~/anaconda3/envs/fastai/lib/python3.6/concurrent/futures/_base.py in result(self, timeout)
423 raise CancelledError()
424 elif self._state == FINISHED:
--> 425 return self.__get_result()
426
427 self._condition.wait(timeout)
~/anaconda3/envs/fastai/lib/python3.6/concurrent/futures/_base.py in __get_result(self)
382 def __get_result(self):
383 if self._exception:
--> 384 raise self._exception
385 else:
386 return self._result
~/anaconda3/envs/fastai/lib/python3.6/concurrent/futures/thread.py in run(self)
54
55 try:
---> 56 result = self.fn(*self.args, **self.kwargs)
57 except BaseException as exc:
58 self.future.set_exception(exc)
~/fastai/courses/dl1/fastai/dataloader.py in get_batch(self, indices)
69
70 def get_batch(self, indices):
---> 71 res = self.np_collate([self.dataset[i] for i in indices])
72 if self.transpose: res[0] = res[0].T
73 if self.transpose_y: res[1] = res[1].T
~/fastai/courses/dl1/fastai/dataloader.py in <listcomp>(.0)
69
70 def get_batch(self, indices):
---> 71 res = self.np_collate([self.dataset[i] for i in indices])
72 if self.transpose: res[0] = res[0].T
73 if self.transpose_y: res[1] = res[1].T
~/fastai/courses/dl1/fastai/dataset.py in __getitem__(self, idx)
159
160 def __getitem__(self, idx):
--> 161 x,y = self.get_x(idx),self.get_y(idx)
162 return self.get(self.transform, x, y)
163
~/fastai/courses/dl1/fastai/dataset.py in get_x(self, i)
229 super().__init__(transform)
230 def get_sz(self): return self.transform.sz
--> 231 def get_x(self, i): return open_image(os.path.join(self.path, self.fnames[i]))
232 def get_n(self): return len(self.fnames)
233
~/fastai/courses/dl1/fastai/dataset.py in open_image(fn)
213 flags = cv2.IMREAD_UNCHANGED+cv2.IMREAD_ANYDEPTH+cv2.IMREAD_ANYCOLOR
214 if not os.path.exists(fn):
--> 215 raise OSError('No such file or directory: {}'.format(fn))
216 elif os.path.isdir(fn):
217 raise OSError('Is a directory: {}'.format(fn))
OSError: No such file or directory: data/dogbreeds/train/e1b7f7010a5f6162a99fffc720f3259b