TypeError in Lesson3-camvid

Hello all,

I am working on lesson3-camvid notebook on Google Colab. I received this UserWarning and TypeError after running this code under the section Dataset:

size = src_size//2
bs=8

src = (SegmentationItemList.from_folder(path_img)
.split_by_fname_file(’…/valid.txt’)
.label_from_func(get_y_fn, classes=codes))

data = (src.transform(get_transforms(), size=size, tfm_y=True)
.databunch(bs=bs)
.normalize(imagenet_stats))

UserWarning

You can deactivate this warning by passing no_check=True.
/usr/local/lib/python3.6/dist-packages/fastai/basic_data.py:224: UserWarning: There seems to be something wrong with your dataset, can’t access any element of self.train_ds.
Tried: 187,258,314,296,209…
_ warn(warn_msg)_


And after running the next set of code data.show_batch(), I am receiving a TypeError: new(): argument ‘size’ must be tuple of ints, but found element of type numpy.float64 at pos 2

data.show_batch(2, figsize=(10,7))

TypeError

TypeError Traceback (most recent call last)
in ()
----> 1 data.show_batch(2, figsize=(10,7))

/usr/local/lib/python3.6/dist-packages/fastai/basic_data.py in show_batch(self, rows, ds_type, **kwargs)
_ 157 def show_batch(self, rows:int=5, ds_type:DatasetType=DatasetType.Train, **kwargs)->None:_
_ 158 “Show a batch of data in ds_type on a few rows.”_
–> 159 x,y = self.one_batch(ds_type, True, True)
_ 160 if self.train_ds.x.square_show: rows = rows ** 2
_ 161 xs = [self.train_ds.x.reconstruct(grab_idx(x, i)) for i in range(rows)]_

/usr/local/lib/python3.6/dist-packages/fastai/basic_data.py in one_batch(self, ds_type, detach, denorm, cpu)
_ 140 w = self.num_workers_
_ 141 self.num_workers = 0_
–> 142 try: x,y = next(iter(dl))
_ 143 finally: self.num_workers = w_
_ 144 if detach: x,y = to_detach(x,cpu=cpu),to_detach(y,cpu=cpu)_

/usr/local/lib/python3.6/dist-packages/fastai/basic_data.py in iter(self)
_ 69 def iter(self):_
_ 70 “Process and returns items from DataLoader.”_
—> 71 for b in self.dl: yield self.proc_batch(b)
_ 72 _
_ 73 @classmethod_

/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py in next(self)
_ 635 self.reorder_dict[idx] = batch_
_ 636 continue_
–> 637 return self.process_next_batch(batch)
_ 638 _
_ 639 next = next # Python 2 compatibility

/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py in process_next_batch(self, batch)
_ 656 self.put_indices()
_ 657 if isinstance(batch, ExceptionWrapper):

–> 658 raise batch.exc_type(batch.exc_msg)
_ 659 return batch_
_ 660 _

TypeError: Traceback (most recent call last):
_ File “/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py”, line 138, in worker_loop
_ samples = collate_fn([dataset[i] for i in batch_indices])_
_ File “/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py”, line 138, in _
_ samples = collate_fn([dataset[i] for i in batch_indices])_
_ File “/usr/local/lib/python3.6/dist-packages/fastai/data_block.py”, line 566, in getitem_
_ x = x.apply_tfms(self.tfms, **self.tfmargs)_
_ File “/usr/local/lib/python3.6/dist-packages/fastai/vision/image.py”, line 109, in apply_tfms_
_ x.resize(target)_
_ File “/usr/local/lib/python3.6/dist-packages/fastai/vision/image.py”, line 185, in resize_
_ self.flow = affine_grid(size)
_ File “/usr/local/lib/python3.6/dist-packages/fastai/vision/image.py”, line 528, in affine_grid
_ grid = FloatTensor(N, H, W, 2)_
TypeError: new(): argument ‘size’ must be tuple of ints, but found element of type numpy.float64 at pos 2

Please help me with this regards.

Thanks
Theivaprakasham Hari