Hi. I am trying to train a deep learning model using the output from the Label Objects for Deep Learning tool. However, after clicking 'run' it almost immediately returns with a failed notice. There is no error code, and instead it reads as follows:
Traceback (most recent call last):
File "c:\program files\arcgis\pro\Resources\ArcToolbox\toolboxes\Image Analyst Tools.tbx\TrainDeepLearningModel.tool\tool.script.execute.py", line 315, in execute
data_bunch = prepare_data(in_folders, working_dir=out_folder, **prepare_data_kwargs)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\learn\_data.py", line 3132, in prepare_data
x_shape = data.train_ds[0][0].shape
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\fastai\data_block.py", line 657, in __getitem__
if self.item is None: x,y = self.x[idxs],self.y[idxs]
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\fastai\data_block.py", line 120, in __getitem__
if isinstance(idxs, Integral): return self.get(idxs)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\fastai\vision\data.py", line 270, in get
fn = super().get(i)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\fastai\data_block.py", line 75, in get
return self.items[i]
IndexError: index 0 is out of bounds for axis 0 with size 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\program files\arcgis\pro\Resources\ArcToolbox\toolboxes\Image Analyst Tools.tbx\TrainDeepLearningModel.tool\tool.script.execute.py", line 397, in <module>
execute()
File "c:\program files\arcgis\pro\Resources\ArcToolbox\toolboxes\Image Analyst Tools.tbx\TrainDeepLearningModel.tool\tool.script.execute.py", line 391, in execute
del data_bunch
UnboundLocalError: local variable 'data_bunch' referenced before assignment
Failed script Train Deep Learning Model...
Failed to execute (TrainDeepLearningModel).
I can only determine two possible error messages: IndexError: index 0 is out of bounds for axis 0 with size 0 and UnboundLocalError: local variable 'data_bunch' referenced before assignment. Even after looking online, I don't understand what these errors are or how to solve them.
Any advice on this issue would be appreciated, thank you in advance.