Hi,
I got training data for my deep learning model by using export training data for deep learning tool in Arcgis Pro. I would like to do data augmentation on this training data. So, my code is
data=arcgis.learn.prepare_data(r'G:\data_training',
class_mapping={0: 'tree'}, chip_size=640, val_split_pct=0.1, batch_size=2,transforms=True,resize_to=800).
When I run the code, it has error:
File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\learn\_data.py, in prepare_data: Line 1570: data = (data.transform(transforms, **kwargs_transforms) File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\fastai\data_block.py, in transform: Line 504: assert is_listy(tfms) and len(tfms) == 2, "Please pass a list of two lists of transforms (train and valid)." AssertionError: Please pass a list of two lists of transforms (train and valid)
Could you please suggest how I can fix this error? Thank you for your help
Solved! Go to Solution.
Thank you for your great help. I will do and let you know the result.
No need of providing a tuple (tfms1,tfms2) for transforms. The get_transforms function itself generates two transformations - One for training and the other for validation respectively. Just pass "transforms=tfms" within prepare_data()