Select to view content in your preferred language

Train Deep Learning Model Zero Division Error

429
11
02-03-2025 03:05 PM
Labels (1)
Ed_
by MVP Regular Contributor
MVP Regular Contributor

The Train Deep Learning Model is failing on me in ArcGIS Pro 3.4.2 even though I have even number of training features.

I am btw also using a pre-trained model (Water Body Extraction (SAR) - USA) as well in the tool.

Validation set at 10

Here's a snippet of stat file 

Ed__0-1738623782718.png

Tool

Ed__2-1738623886499.png

 

Error

Ed__1-1738623828438.png

@PavanYadav any clues?

Question | Analyze | Visualize
Tags (1)
0 Kudos
11 Replies
Ed_
by MVP Regular Contributor
MVP Regular Contributor

@BrendanNewell @ShivaniPathak can you please help with this? Thank you!

Question | Analyze | Visualize
0 Kudos
ShivaniPathak
Esri Contributor

Hi @Ed_ , could you please confirm if you've referred to the guide for creating the training data?

Ed_
by MVP Regular Contributor
MVP Regular Contributor

Hi Shivani, thank you for the reply, yes I basically created a very small training subset from the USA Wetlands data available on the Living Atlas. In that subset I then added an attribute for class value of 1.

Question | Analyze | Visualize
0 Kudos
ShivaniPathak
Esri Contributor

Also which ArcGIS Pro version are you using?

Ed_
by MVP Regular Contributor
MVP Regular Contributor

I am on the latest version of Pro that is 3.4.2. I am surprised that it's giving me the zero division error, because as you can see in the above stat file screenshot, the training data has 600 features. 

Question | Analyze | Visualize
0 Kudos
PavanYadav
Esri Regular Contributor

hi @Ed_ we need to handle this error bit better and provide you with actionable information. One reason that I have seen this occur is that when the batch size is larger than the number of chips in the data, the Train Deep Learning Model tool may return  "ZeroDivisionError: division by zero" in this case. 

It looks like you have 5 images chips and your batch size if 8. 

Pavan Yadav
Product Engineer at Esri
AI for Imagery
Connect with me on LinkedIn!
Contact Esri Support Services
Ed_
by MVP Regular Contributor
MVP Regular Contributor

Hi Pavan, happy Friday, thank you for the response, so in this case what should be batch size then?

Question | Analyze | Visualize
0 Kudos
PavanYadav
Esri Regular Contributor

@Ed_ you can try 2, but to be honest; I would have at least 50-100 samples just to be on the safer side.. I see your tile size is 512, which could be fairly large for your GPU.. maybe decease it  to 256 and use a stride of 128.. these will produce a lot more image chips..

Pavan Yadav
Product Engineer at Esri
AI for Imagery
Connect with me on LinkedIn!
Contact Esri Support Services
Ed_
by MVP Regular Contributor
MVP Regular Contributor

i do have 600 training features, so what do you mean by 50-100 samples? Are those the number of image chips? 

I do have Nvidia RTX A2000 12 gig, so should i still decrease the tile size?

Question | Analyze | Visualize
0 Kudos