Lesson7 -wgan issue with tuple objects items


While executing the Lesson7- wgan lesson I am getting an error on the line below.

AttributeError Traceback (most recent call last)
in ()
----> 1 learn.fit(10,2e-4)

~/.anaconda3/lib/python3.7/site-packages/fastai/basic_train.py in fit(self, epochs, lr, wd, callbacks)
188 if defaults.extra_callbacks is not None: callbacks += defaults.extra_callbacks
189 fit(epochs, self.model, self.loss_func, opt=self.opt, data=self.data, metrics=self.metrics,
–> 190 callbacks=self.callbacks+callbacks)
192 def create_opt(self, lr:Floats, wd:Floats=0.)->None:

~/.anaconda3/lib/python3.7/site-packages/fastai/basic_train.py in fit(epochs, model, loss_func, opt, data, callbacks, metrics)
90 cb_handler.on_epoch_begin()
91 for xb,yb in progress_bar(data.train_dl, parent=pbar):
—> 92 xb, yb = cb_handler.on_batch_begin(xb, yb)
93 loss = loss_batch(model, xb, yb, loss_func, opt, cb_handler)
94 if cb_handler.on_batch_end(loss): break

~/.anaconda3/lib/python3.7/site-packages/fastai/callback.py in on_batch_begin(self, xb, yb, train)
253 self.state_dict[‘train’],self.state_dict[‘stop_epoch’] = train,False
254 self.state_dict[‘skip_step’],self.state_dict[‘skip_zero’] = False,False
–> 255 self(‘batch_begin’, mets = not self.state_dict[‘train’])
256 return self.state_dict[‘last_input’], self.state_dict[‘last_target’]

~/.anaconda3/lib/python3.7/site-packages/fastai/callback.py in call(self, cb_name, call_mets, **kwargs)
224 if call_mets:
225 for met in self.metrics: self._call_and_update(met, cb_name, **kwargs)
–> 226 for cb in self.callbacks: self._call_and_update(cb, cb_name, **kwargs)
228 def set_dl(self, dl:DataLoader):

~/.anaconda3/lib/python3.7/site-packages/fastai/callback.py in call_and_update(self, cb, cb_name, **kwargs)
215 “Call cb_name on cb and update the inner state.”
216 new = ifnone(getattr(cb, f’on
{cb_name}’)(**self.state_dict, **kwargs), dict())
–> 217 for k,v in new.items():
218 if k not in self.state_dict:
219 raise Exception(f"{k} isn’t a valid key in the state of the callbacks.")

AttributeError: ‘tuple’ object has no attribute 'items’

Please advise.