<?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: 'numpy.ndarray' object has no attribute 'unsqueeze' error when using MaskRCNN in arcgis.learn in ArcGIS Notebooks Questions</title>
    <link>https://community.esri.com/t5/arcgis-notebooks-questions/numpy-ndarray-object-has-no-attribute-unsqueeze/m-p/238073#M44</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This issue can occur when Anaconda and ArcGIS Pro are installed on the same machine. This setup is not recommended because having two different Conda versions interfering with each other can lead to unexpected behavior. See the following documentation for more info:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A data-value="https://developers.arcgis.com/python/guide/understanding-conda/" href="https://developers.arcgis.com/python/guide/understanding-conda/" rel="noopener noreferrer" style="color: var(--lwc-brandtextlink,#006dcc); background-color: #ffffff; text-decoration: none;" target="_blank" title=""&gt;https://developers.arcgis.com/python/guide/understanding-conda/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fix:&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Uninstall Anaconda and set up a new deep learning python environment in ArcGIS Pro&lt;/P&gt;&lt;P&gt;&lt;A class="" data-value="https://pro.arcgis.com/en/pro-app/help/analysis/image-analyst/install-deep-learning-frameworks.htm" href="https://pro.arcgis.com/en/pro-app/help/analysis/image-analyst/install-deep-learning-frameworks.htm" rel="noopener noreferrer" style="color: var(--lwc-brandtextlink,#006dcc); background-color: #ffffff; text-decoration: none;" target="_blank" title=""&gt;https://pro.arcgis.com/en/pro-app/help/analysis/image-analyst/install-deep-learning-frameworks.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Jul 2020 18:17:41 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2020-07-24T18:17:41Z</dc:date>
    <item>
      <title>'numpy.ndarray' object has no attribute 'unsqueeze' error when using MaskRCNN in arcgis.learn</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/numpy-ndarray-object-has-no-attribute-unsqueeze/m-p/238072#M43</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to setup a deep learning framework with a MaskRCNN model. I am using a LiDAR intensity raster image and a feature class of water body polygons to create the training data. When I run the arcgis.learn.prepare_data() tool, I get the following error message:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN class="" style="color: #b22b31; font-weight: bold;"&gt;---------------------------------------------------------------------------&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b22b31; font-weight: bold;"&gt;AttributeError&lt;/SPAN&gt;                            Traceback (most recent call last)&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;&amp;lt;ipython-input-22-c485ff65baef&amp;gt;&lt;/SPAN&gt; in &lt;SPAN class="" style="color: #60c6c8;"&gt;&amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;      2&lt;/SPAN&gt; &lt;SPAN class="" style="color: #b22b31; font-weight: bold;"&gt;# When running export training data for deep learning, make sure the meta data format is appropriate for the model&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;      3&lt;/SPAN&gt; data_path &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;r'Q:/Data/CFlynn/DL_Breaklines/MaskRCNN/TrainingData4'&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;----&amp;gt; 4&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt; &lt;/SPAN&gt;data &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt; prepare_data&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;data_path&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; batch_size&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #258f8f; font-weight: bold;"&gt;2&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; imagery_type&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;'ms'&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;~\AppData\Local\ESRI\conda\envs\pyenvdeep\lib\site-packages\arcgis\learn\_data.py&lt;/SPAN&gt; in &lt;SPAN class="" style="color: #60c6c8;"&gt;prepare_data&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;(path, class_mapping, chip_size, val_split_pct, batch_size, transforms, collate_fn, seed, dataset_type, resize_to, **kwargs)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    630&lt;/SPAN&gt;             kwargs&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;'do_normalize'&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;]&lt;/SPAN&gt; &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;False&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    631&lt;/SPAN&gt;             &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;if&lt;/SPAN&gt; transforms &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;==&lt;/SPAN&gt;  &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;None&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;--&amp;gt; 632&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;                 data = (src.transform(size=chip_size, tfm_y=True)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    633&lt;/SPAN&gt;                     .databunch(**databunch_kwargs))&lt;SPAN class="" style="color: #00a250;"&gt;    634&lt;/SPAN&gt;             &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;else&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;~\AppData\Local\ESRI\conda\envs\pyenvdeep\lib\site-packages\fastai\data_block.py&lt;/SPAN&gt; in &lt;SPAN class="" style="color: #60c6c8;"&gt;transform&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;(self, tfms, **kwargs)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    500&lt;/SPAN&gt;         &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;if&lt;/SPAN&gt; &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;not&lt;/SPAN&gt; tfms&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt; tfms&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;None&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;None&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    501&lt;/SPAN&gt;         &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;assert&lt;/SPAN&gt; is_listy&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;tfms&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt; &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;and&lt;/SPAN&gt; len&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;tfms&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt; &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;==&lt;/SPAN&gt; &lt;SPAN class="" style="color: #258f8f; font-weight: bold;"&gt;2&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; &lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;"Please pass a list of two lists of transforms (train and valid)."&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;--&amp;gt; 502&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;         &lt;/SPAN&gt;self&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;train&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;transform&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;tfms&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="" style="color: #258f8f; font-weight: bold;"&gt;0&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;]&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;**&lt;/SPAN&gt;kwargs&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    503&lt;/SPAN&gt;         self&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;valid&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;transform&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;tfms&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="" style="color: #258f8f; font-weight: bold;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;]&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;**&lt;/SPAN&gt;kwargs&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    504&lt;/SPAN&gt;         &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;if&lt;/SPAN&gt; self&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;test&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt; self&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;test&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;transform&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;tfms&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="" style="color: #258f8f; font-weight: bold;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;]&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;**&lt;/SPAN&gt;kwargs&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;~\AppData\Local\ESRI\conda\envs\pyenvdeep\lib\site-packages\fastai\data_block.py&lt;/SPAN&gt; in &lt;SPAN class="" style="color: #60c6c8;"&gt;transform&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;(self, tfms, tfm_y, **kwargs)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    718&lt;/SPAN&gt;     &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;def&lt;/SPAN&gt; transform&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; tfms&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt;TfmList&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; tfm_y&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt;bool&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;None&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;**&lt;/SPAN&gt;kwargs&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    719&lt;/SPAN&gt;         &lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;"Set the `tfms` and `tfm_y` value to be applied to the inputs and targets."&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;--&amp;gt; 720&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;         &lt;/SPAN&gt;_check_kwargs&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;x&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; tfms&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;**&lt;/SPAN&gt;kwargs&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    721&lt;/SPAN&gt;         &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;if&lt;/SPAN&gt; tfm_y &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;is&lt;/SPAN&gt; &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;None&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt; tfm_y &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt; self&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;tfm_y&lt;SPAN class="" style="color: #00a250;"&gt;    722&lt;/SPAN&gt;         tfms_y &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;None&lt;/SPAN&gt; &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;if&lt;/SPAN&gt; tfms &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;is&lt;/SPAN&gt; &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;None&lt;/SPAN&gt; &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;else&lt;/SPAN&gt; list&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;filter&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;lambda&lt;/SPAN&gt; t&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt; getattr&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;t&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; &lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;'use_on_y'&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;True&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; listify&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;tfms&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;~\AppData\Local\ESRI\conda\envs\pyenvdeep\lib\site-packages\fastai\data_block.py&lt;/SPAN&gt; in &lt;SPAN class="" style="color: #60c6c8;"&gt;_check_kwargs&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;(ds, tfms, **kwargs)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    588&lt;/SPAN&gt;     &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;if&lt;/SPAN&gt; &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;tfms &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;is&lt;/SPAN&gt; &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;None&lt;/SPAN&gt; &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;or&lt;/SPAN&gt; len&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;tfms&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt; &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;==&lt;/SPAN&gt; &lt;SPAN class="" style="color: #258f8f; font-weight: bold;"&gt;0&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt; &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;and&lt;/SPAN&gt; len&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;kwargs&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt; &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;==&lt;/SPAN&gt; &lt;SPAN class="" style="color: #258f8f; font-weight: bold;"&gt;0&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt; &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;return&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    589&lt;/SPAN&gt;     &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;if&lt;/SPAN&gt; len&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;ds&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;items&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt; &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;&amp;gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #258f8f; font-weight: bold;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;--&amp;gt; 590&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;         &lt;/SPAN&gt;x &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt; ds&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="" style="color: #258f8f; font-weight: bold;"&gt;0&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;]&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    591&lt;/SPAN&gt;         &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;try&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt; x&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;apply_tfms&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;tfms&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;**&lt;/SPAN&gt;kwargs&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    592&lt;/SPAN&gt;         &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;except&lt;/SPAN&gt; Exception &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;as&lt;/SPAN&gt; e&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;~\AppData\Local\ESRI\conda\envs\pyenvdeep\lib\site-packages\fastai\data_block.py&lt;/SPAN&gt; in &lt;SPAN class="" style="color: #60c6c8;"&gt;__getitem__&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;(self, idxs)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    116&lt;/SPAN&gt;         &lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;"returns a single item based if `idxs` is an integer or a new `ItemList` object if `idxs` is a range."&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    117&lt;/SPAN&gt;         idxs &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt; try_int&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;idxs&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;--&amp;gt; 118&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;         &lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;if&lt;/SPAN&gt; isinstance&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;idxs&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; Integral&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt; &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;return&lt;/SPAN&gt; self&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;idxs&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    119&lt;/SPAN&gt;         &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;else&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt; &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;return&lt;/SPAN&gt; self&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;new&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;items&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;[&lt;/SPAN&gt;idxs&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;]&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; inner_df&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt;index_row&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;inner_df&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; idxs&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    120&lt;/SPAN&gt;  &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;~\AppData\Local\ESRI\conda\envs\pyenvdeep\lib\site-packages\fastai\vision\data.py&lt;/SPAN&gt; in &lt;SPAN class="" style="color: #60c6c8;"&gt;get&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;(self, i)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    269&lt;/SPAN&gt;     &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;def&lt;/SPAN&gt; get&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; i&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    270&lt;/SPAN&gt;         fn &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt; super&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;i&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;--&amp;gt; 271&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;         &lt;/SPAN&gt;res &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt; self&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;open&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;fn&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    272&lt;/SPAN&gt;         self&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;sizes&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;]&lt;/SPAN&gt; &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt; res&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;size&lt;SPAN class="" style="color: #00a250;"&gt;    273&lt;/SPAN&gt;         &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;return&lt;/SPAN&gt; res &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;~\AppData\Local\ESRI\conda\envs\pyenvdeep\lib\site-packages\arcgis\learn\models\_maskrcnn_utils.py&lt;/SPAN&gt; in &lt;SPAN class="" style="color: #60c6c8;"&gt;open&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;(self, fn)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    139&lt;/SPAN&gt;         x &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt; gdal&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;Open&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;path&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;ReadAsArray&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    140&lt;/SPAN&gt;         &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;if&lt;/SPAN&gt; len&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;x&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;shape&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;==&lt;/SPAN&gt;&lt;SPAN class="" style="color: #258f8f; font-weight: bold;"&gt;2&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;--&amp;gt; 141&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;             &lt;/SPAN&gt;x &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt; x&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;unsqueeze&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #258f8f; font-weight: bold;"&gt;0&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    142&lt;/SPAN&gt;         x &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt; torch&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;tensor&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;x&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;astype&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;np&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;float32&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    143&lt;/SPAN&gt;         x &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt; ArcGISMSImage&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;x&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b22b31; font-weight: bold;"&gt;AttributeError&lt;/SPAN&gt;: 'numpy.ndarray' object has no attribute 'unsqueeze'

&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;I'd appreciate any comments or suggestions.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 11:59:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/numpy-ndarray-object-has-no-attribute-unsqueeze/m-p/238072#M43</guid>
      <dc:creator>ColinFlynn1</dc:creator>
      <dc:date>2021-12-11T11:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: 'numpy.ndarray' object has no attribute 'unsqueeze' error when using MaskRCNN in arcgis.learn</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/numpy-ndarray-object-has-no-attribute-unsqueeze/m-p/238073#M44</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This issue can occur when Anaconda and ArcGIS Pro are installed on the same machine. This setup is not recommended because having two different Conda versions interfering with each other can lead to unexpected behavior. See the following documentation for more info:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A data-value="https://developers.arcgis.com/python/guide/understanding-conda/" href="https://developers.arcgis.com/python/guide/understanding-conda/" rel="noopener noreferrer" style="color: var(--lwc-brandtextlink,#006dcc); background-color: #ffffff; text-decoration: none;" target="_blank" title=""&gt;https://developers.arcgis.com/python/guide/understanding-conda/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fix:&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Uninstall Anaconda and set up a new deep learning python environment in ArcGIS Pro&lt;/P&gt;&lt;P&gt;&lt;A class="" data-value="https://pro.arcgis.com/en/pro-app/help/analysis/image-analyst/install-deep-learning-frameworks.htm" href="https://pro.arcgis.com/en/pro-app/help/analysis/image-analyst/install-deep-learning-frameworks.htm" rel="noopener noreferrer" style="color: var(--lwc-brandtextlink,#006dcc); background-color: #ffffff; text-decoration: none;" target="_blank" title=""&gt;https://pro.arcgis.com/en/pro-app/help/analysis/image-analyst/install-deep-learning-frameworks.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2020 18:17:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/numpy-ndarray-object-has-no-attribute-unsqueeze/m-p/238073#M44</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-07-24T18:17:41Z</dc:date>
    </item>
  </channel>
</rss>

