Hello, is there a way to use all sample data for just training and not validation? Val_split_pct parameter which shows the percentage of training data to keep as validation, doesn't accept 0 value.
I tried MultiTaskRoadExtractor model and it doesn't give any error so, the problem is just ChangeDetector model
Yes, the prepare_data gives the error. This model is a bit different from other models I mean in the training dataset I have 3 different folders, (images before, images_after, labels); however, for instance, in case of Multitaskroadextractor model I had 2 folders (images and labels). I don't think my training dataset has any problem since it works with other values of val_split_pct parameter. The whole error message:
IndexError Traceback (most recent call last) In [1]: Line 7: batch_size=4 File C:\Users\barzegarm\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone1\lib\site-packages\arcgis\learn\_data.py, in prepare_data: Line 1368: **kwargs) File C:\Users\barzegarm\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone1\lib\site-packages\arcgis\learn\_utils\change_detection_data.py, in prepare_change_detection_data: Line 695: imagery_type=imagery_type File C:\Users\barzegarm\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone1\lib\site-packages\arcgis\learn\_utils\change_detection_data.py, in create_train_val_sets: Line 610: imagery_type=imagery_type File C:\Users\barzegarm\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone1\lib\site-packages\arcgis\learn\_utils\change_detection_data.py, in __init__: Line 322: self.n_c = self.x[0].data.shape[0] File C:\Users\barzegarm\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone1\lib\site-packages\fastai\data_block.py, in __getitem__: Line 120: if isinstance(idxs, Integral): return self.get(idxs) File C:\Users\barzegarm\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone1\lib\site-packages\fastai\vision\data.py, in get: Line 270: fn = super().get(i) File C:\Users\barzegarm\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone1\lib\site-packages\fastai\data_block.py, in get: Line 75: return self.items[i] IndexError: index 0 is out of bounds for axis 0 with size 0 ---------------------------------------------------------------------------
Is it the prepare_data step that gives the error? It may be an issue within the training data itself?
I have run a SingleShotDetector with 0% validation split and it works ok too. Note: the show_results and average_precision functions won't work and will give index errors. When you do the save function you will have to pass a compute_metrics=False parameter to save the model or it will give an index error also.
Hi Tim, I'm using ChangeDetector model and it gives me the below error:
"ename": "IndexError","evalue": "index 0 is out of bounds for axis 0 with size 0",
data = prepare_data(output_path,chip_size=256,val_split_pct=0.0,dataset_type='ChangeDetection',batch_size=4)
It looks like this works when using a jupyter notebook. Setting the val_split_pct to 0.0 doesn't give any errors and trains the model ok. As expected, the validation loss cannot be calculated.
However when using the Train Deep Learning Model tool in Pro, it seems to use some of the training data for validation despite putting in zero as the split. So I think it may default back to 10% - but I am not sure.
The above is true for my MaskRCNN model, but may be different for other models. What model are you using and is it giving you any errors when trying to do a zero percent split?
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.