Any chance in a fix for this. I’m getting the same error.
np.random.seed(42)
src = (ImageList.from_df(df, path=f’{path}/images’, suffix=’.jpg’)
.split_by_rand_pct()
.label_from_df(cols=5)
.transform(tfms, size=128)
.databunch().normalize(imagenet_stats)
)
data = (src.transform(tfms, size=256))
AttributeError Traceback (most recent call last)
~/anaconda3/envs/python3/lib/python3.6/site-packages/fastai/data_block.py in _check_kwargs(ds, tfms, **kwargs)
597 x = ds[0]
–> 598 try: x.apply_tfms(tfms, **kwargs)
599 except Exception as e:
~/anaconda3/envs/python3/lib/python3.6/site-packages/fastai/vision/image.py in apply_tfms(self, tfms, do_resolve, xtra, size, resize_method, mult, padding_mode, mode, remove_out)
104 resize_method = ifnone(resize_method, default_rsz)
–> 105 if resize_method <= 2 and size is not None: tfms = self._maybe_add_crop_pad(tfms)
106 tfms = sorted(tfms, key=lambda o: o.tfm.order)
~/anaconda3/envs/python3/lib/python3.6/site-packages/fastai/vision/transform.py in _image_maybe_add_crop_pad(img, tfms)
206 def _image_maybe_add_crop_pad(img, tfms):
–> 207 tfm_names = [tfm.name for tfm in tfms]
208 return [crop_pad()] + tfms if ‘crop_pad’ not in tfm_names else tfms
~/anaconda3/envs/python3/lib/python3.6/site-packages/fastai/vision/transform.py in (.0)
206 def _image_maybe_add_crop_pad(img, tfms):
–> 207 tfm_names = [tfm.name for tfm in tfms]
208 return [crop_pad()] + tfms if ‘crop_pad’ not in tfm_names else tfms
AttributeError: ‘list’ object has no attribute ‘name’
During handling of the above exception, another exception occurred:
Exception Traceback (most recent call last)
in
----> 1 data = (src.transform(tfms, size=256))
~/anaconda3/envs/python3/lib/python3.6/site-packages/fastai/data_block.py in transform(self, tfms, tfm_y, **kwargs)
726 def transform(self, tfms:TfmList, tfm_y:bool=None, **kwargs):
727 “Set the tfms
and tfm_y
value to be applied to the inputs and targets.”
–> 728 _check_kwargs(self.x, tfms, **kwargs)
729 if tfm_y is None: tfm_y = self.tfm_y
730 tfms_y = None if tfms is None else list(filter(lambda t: getattr(t, ‘use_on_y’, True), listify(tfms)))
~/anaconda3/envs/python3/lib/python3.6/site-packages/fastai/data_block.py in _check_kwargs(ds, tfms, **kwargs)
598 try: x.apply_tfms(tfms, **kwargs)
599 except Exception as e:
–> 600 raise Exception(f"It’s not possible to apply those transforms to your dataset:\n {e}")
601
602 class LabelList(Dataset):
Exception: It’s not possible to apply those transforms to your dataset:
‘list’ object has no attribute ‘name’