<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error: Could not find 'NumPixelsPerClass' in step Train Deep Learning Model in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/error-could-not-find-numpixelsperclass-in-step/m-p/1062585#M41422</link>
    <description>&lt;P&gt;Do you mean in this case to use a model not so deeper, for example, use Resnet50 instead Resnet34 for example?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I checked here, and I have 4GB memory dedicate to Geforce and 7.9GB shared with IntelR 630,&amp;nbsp;Please, if you could help me to improve or set for the best way to run my data, I really would appreciate it.&lt;/P&gt;</description>
    <pubDate>Thu, 27 May 2021 21:36:24 GMT</pubDate>
    <dc:creator>NayaraV</dc:creator>
    <dc:date>2021-05-27T21:36:24Z</dc:date>
    <item>
      <title>Error: Could not find 'NumPixelsPerClass' in step Train Deep Learning Model</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-could-not-find-numpixelsperclass-in-step/m-p/1062554#M41420</link>
      <description>&lt;P&gt;Hi, I received this error when I tried to Train Deep Learning Model. (Arcgis Pro 2.7)&lt;BR /&gt;I created the label with "Label Objects for Deep Learning" with 1 class. I exported the training with metadata as "Classified Tiles".&lt;BR /&gt;&lt;STRONG&gt;My Error Message:&lt;/STRONG&gt;&lt;BR /&gt;&lt;U&gt;Could not find 'NumPixelsPerClass'&lt;/U&gt; in 'esri_accumulated_stats.json'. Ignoring `class_balancing` parameter.&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "c:\program files\arcgis\pro\Resources\ArcToolbox\toolboxes\Image Analyst Tools.tbx\TrainDeepLearningModel.tool\tool.script.execute.py", line 232, in &amp;lt;module&amp;gt;&lt;BR /&gt;execute()&lt;BR /&gt;File "c:\program files\arcgis\pro\Resources\ArcToolbox\toolboxes\Image Analyst Tools.tbx\TrainDeepLearningModel.tool\tool.script.execute.py", line 207, in execute&lt;BR /&gt;show_accuracy=show_accuracy)]&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\deeplearning\lib\site-packages\arcgis\learn\models\_arcgis_model.py", line 708, in fit&lt;BR /&gt;self.learn.fit_one_cycle(epochs, lr, callbacks=callbacks, **kwargs)&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\deeplearning\lib\site-packages\fastai\train.py", line 23, in fit_one_cycle&lt;BR /&gt;learn.fit(cyc_len, max_lr, wd=wd, callbacks=callbacks)&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\deeplearning\lib\site-packages\fastai\basic_train.py", line 200, in fit&lt;BR /&gt;fit(epochs, self, metrics=self.metrics, callbacks=self.callbacks+callbacks)&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\deeplearning\lib\site-packages\fastai\basic_train.py", line 101, in fit&lt;BR /&gt;loss = loss_batch(learn.model, xb, yb, learn.loss_func, learn.opt, cb_handler)&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\deeplearning\lib\site-packages\fastai\basic_train.py", line 34, in loss_batch&lt;BR /&gt;if not skip_bwd: loss.backward()&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\deeplearning\lib\site-packages\torch\tensor.py", line 195, in backward&lt;BR /&gt;torch.autograd.backward(self, gradient, retain_graph, create_graph)&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\deeplearning\lib\site-packages\torch\autograd\__init__.py", line 99, in backward&lt;BR /&gt;allow_unreachable=True) # allow_unreachable flag&lt;BR /&gt;RuntimeError: CUDA out of memory. Tried to allocate 64.00 MiB (GPU 0; 4.00 GiB total capacity; 2.72 GiB already allocated; 60.95 MiB free; 2.89 GiB reserved in total by PyTorch)&lt;BR /&gt;Ocorreu um erro ao executar (TrainDeepLearningModel)&lt;BR /&gt;&lt;BR /&gt;Please, anyone could help me? I've been working for days trying to fix it&lt;BR /&gt;Kindly&lt;BR /&gt;Nayara&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2021 20:35:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-could-not-find-numpixelsperclass-in-step/m-p/1062554#M41420</guid>
      <dc:creator>NayaraV</dc:creator>
      <dc:date>2021-05-27T20:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Could not find 'NumPixelsPerClass' in step Train Deep Learning Model</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-could-not-find-numpixelsperclass-in-step/m-p/1062580#M41421</link>
      <description>&lt;P&gt;&lt;SPAN&gt;RuntimeError: CUDA out of memory. Tried to allocate 64.00 MiB (GPU 0; 4.00 GiB total capacity; 2.72 GiB already allocated; 60.95 MiB free; 2.89 GiB reserved in total by PyTorch)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Did you try on a smaller area... seems you are running out of memory&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2021 21:18:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-could-not-find-numpixelsperclass-in-step/m-p/1062580#M41421</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-05-27T21:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Could not find 'NumPixelsPerClass' in step Train Deep Learning Model</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-could-not-find-numpixelsperclass-in-step/m-p/1062585#M41422</link>
      <description>&lt;P&gt;Do you mean in this case to use a model not so deeper, for example, use Resnet50 instead Resnet34 for example?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I checked here, and I have 4GB memory dedicate to Geforce and 7.9GB shared with IntelR 630,&amp;nbsp;Please, if you could help me to improve or set for the best way to run my data, I really would appreciate it.&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2021 21:36:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-could-not-find-numpixelsperclass-in-step/m-p/1062585#M41422</guid>
      <dc:creator>NayaraV</dc:creator>
      <dc:date>2021-05-27T21:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Could not find 'NumPixelsPerClass' in step Train Deep Learning Model</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-could-not-find-numpixelsperclass-in-step/m-p/1062588#M41423</link>
      <description>&lt;P&gt;When I change the GPU I got this message, I think it's the same as the previous&lt;BR /&gt;&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "c:\program files\arcgis\pro\Resources\ArcToolbox\toolboxes\Image Analyst Tools.tbx\TrainDeepLearningModel.tool\tool.script.execute.py", line 23, in &amp;lt;module&amp;gt;&lt;BR /&gt;torch.cuda.set_device(arcpy.env.gpuId)&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\deeplearning\lib\site-packages\fastai\torch_core.py", line 72, in _new_torch_cuda_set_device&lt;BR /&gt;_old_torch_cuda_set_device(device)&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\deeplearning\lib\site-packages\torch\cuda\__init__.py", line 292, in set_device&lt;BR /&gt;torch._C._cuda_setDevice(device)&lt;BR /&gt;RuntimeError: cuda runtime error (101) : invalid device ordinal at ..\torch\csrc\cuda\Module.cpp:59&lt;BR /&gt;Ocorreu um erro ao executar (TrainDeepLearningModel).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2021 21:40:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-could-not-find-numpixelsperclass-in-step/m-p/1062588#M41423</guid>
      <dc:creator>NayaraV</dc:creator>
      <dc:date>2021-05-27T21:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Could not find 'NumPixelsPerClass' in step Train Deep Learning Model</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-could-not-find-numpixelsperclass-in-step/m-p/1062767#M41433</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try to reduce the tile size during the exporting and batch size during the training.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;If you are working on tile size 448 as mentioned in below figure try to reduce it 50%&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DrVSSKiran_0-1622186364354.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/14482iB738B5EF51088337/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DrVSSKiran_0-1622186364354.png" alt="DrVSSKiran_0-1622186364354.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Secondly, at the time of training the dataset please reduce the batch size is 1 if you worked on 2 or 4 as mentioned the below figure.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DrVSSKiran_1-1622186519882.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/14483i6DC062CE4706A559/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DrVSSKiran_1-1622186519882.png" alt="DrVSSKiran_1-1622186519882.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If still, you will get the same error, kindly check the GPU usage and assign complete GPU for ArcGIS Pro. and Check the python libraries, uninstalled the fast.ai and install the fast.ai and try.&lt;/P&gt;&lt;P&gt;Good Luck.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2021 07:23:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-could-not-find-numpixelsperclass-in-step/m-p/1062767#M41433</guid>
      <dc:creator>DrVSSKiran</dc:creator>
      <dc:date>2021-05-28T07:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Could not find 'NumPixelsPerClass' in step Train Deep Learning Model</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-could-not-find-numpixelsperclass-in-step/m-p/1063278#M41476</link>
      <description>&lt;P&gt;Thank you DrVSSKiran,&lt;/P&gt;&lt;P&gt;I was having problems to login in my account to answer you.&lt;BR /&gt;Actually when you gave your advice and reccomendations I was formating my laptop and reinstalling the Arcgis and frameworks. But the problem countinued the same. So, I did what you suggesting (reducing the tiles size) and now it's running "normal" and I could did several tests.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank you so much &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 May 2021 12:02:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-could-not-find-numpixelsperclass-in-step/m-p/1063278#M41476</guid>
      <dc:creator>NayaraV</dc:creator>
      <dc:date>2021-05-31T12:02:34Z</dc:date>
    </item>
  </channel>
</rss>

