_RemoteTraceback Traceback (most recent call last)
_RemoteTraceback:
""â
Traceback (most recent call last):
File â/home/ec2-user/.pyenv/versions/3.6.0/lib/python3.6/concurrent/futures/process.pyâ, line 175, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File â/home/ec2-user/.pyenv/versions/3.6.0/lib/python3.6/concurrent/futures/process.pyâ, line 153, in _process_chunk
return [fn(*args) for args in chunk]
File â/home/ec2-user/.pyenv/versions/3.6.0/lib/python3.6/concurrent/futures/process.pyâ, line 153, in
return [fn(*args) for args in chunk]
File â/home/ec2-user/fastai/courses/dl1/fastai/dataloader.pyâ, line 73, in get_batch
def get_batch(self, indices): return self.collate_fn([self.dataset[i] for i in indices])
File â/home/ec2-user/fastai/courses/dl1/fastai/dataloader.pyâ, line 73, in
def get_batch(self, indices): return self.collate_fn([self.dataset[i] for i in indices])
File â/home/ec2-user/fastai/courses/dl1/fastai/dataset.pyâ, line 99, in getitem
return self.get(self.transform, x, y)
File â/home/ec2-user/fastai/courses/dl1/fastai/dataset.pyâ, line 104, in get
return (x,y) if tfm is None else tfm(x,y)
File â/home/ec2-user/fastai/courses/dl1/fastai/transforms.pyâ, line 489, in call
def call(self, im, y): return compose(im, y, self.tfms)
File â/home/ec2-user/fastai/courses/dl1/fastai/transforms.pyâ, line 470, in compose
im, y =fn(im, y)
TypeError: call() takes 2 positional arguments but 3 were given
â""
The above exception was the direct cause of the following exception:
TypeError Traceback (most recent call last)
in ()
----> 1 lrf=learn.lr_find()
2 learn.sched.plot()
~/fastai/courses/dl1/fastai/learner.py in lr_find(self, start_lr, end_lr, wds)
97 layer_opt = self.get_layer_opt(start_lr, wds)
98 self.sched = LR_Finder(layer_opt, len(self.data.trn_dl), end_lr)
â> 99 self.fit_gen(self.model, self.data, layer_opt, 1)
100 self.load(âtmpâ)
101
~/fastai/courses/dl1/fastai/learner.py in fit_gen(self, model, data, layer_opt, n_cycle, cycle_len, cycle_mult, cycle_save_name, metrics, callbacks, **kwargs)
81 n_epoch = sum_geom(cycle_len if cycle_len else 1, cycle_mult, n_cycle)
82 fit(model, data, n_epoch, layer_opt.opt, self.crit,
â> 83 metrics=metrics, callbacks=callbacks, reg_fn=self.reg_fn, clip=self.clip, **kwargs)
84
85 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, **kwargs)
86 stepper.reset(True)
87 t = tqdm(iter(data.trn_dl), leave=False)
â> 88 for (*x,y) in t:
89 batch_num += 1
90 loss = stepper.step(V(x),V(y))
~/.pyenv/versions/jupyter/lib/python3.6/site-packages/tqdm/_tqdm.py in iter(self)
951 ââ", fp_write=getattr(self.fp, âwriteâ, sys.stderr.write))
952
â> 953 for obj in iterable:
954 yield obj
955 # Update and possibly print the progressbar.
~/fastai/courses/dl1/fastai/dataset.py in next(self)
226 if self.i>=len(self.dl): raise StopIteration
227 self.i+=1
â> 228 return next(self.it)
229
230 @property
~/fastai/courses/dl1/fastai/dataloader.py in iter(self)
75 def iter(self):
76 with ProcessPoolExecutor(max_workers=self.num_workers) as e:
â> 77 for batch in e.map(self.get_batch, iter(self.batch_sampler)):
78 yield get_tensor(batch, self.pin_memory)
79
~/.pyenv/versions/3.6.0/lib/python3.6/concurrent/futures/_base.py in result_iterator()
554 for future in fs:
555 if timeout is None:
â> 556 yield future.result()
557 else:
558 yield future.result(end_time - time.time())
~/.pyenv/versions/3.6.0/lib/python3.6/concurrent/futures/_base.py in result(self, timeout)
403 raise CancelledError()
404 elif self._state == FINISHED:
â> 405 return self.__get_result()
406 else:
407 raise TimeoutError()
~/.pyenv/versions/3.6.0/lib/python3.6/concurrent/futures/_base.py in __get_result(self)
355 def __get_result(self):
356 if self._exception:
â> 357 raise self._exception
358 else:
359 return self._result
TypeError: call() takes 2 positional arguments but 3 were given