<?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 Error when running UnetClassifier model in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-when-running-unetclassifier-model/m-p/1239559#M8138</link>
    <description>&lt;P&gt;I tried running a UnetClassifier model but i keep getting an error when trying to find the optimal learning rate. The error is as follows:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same&lt;/PRE&gt;&lt;P&gt;Now i found out that this means that the model is running on the gpu and my data is on the cpu. I used the prepare data function to create my data, and i can't find a option to get my data to prepare on GPU instead of CPU.&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;I am running my code in a notebook in arcgis pro version 3.0.2, the dataset i'm using is&amp;nbsp;&lt;A href="https://geosaurus.maps.arcgis.com/home/item.html?id=08ccd71f862940bda1d8350c8cc91a47" target="_self"&gt;land_cover_classification_using_sparse_training_data&lt;/A&gt;&amp;nbsp; and i'm running the code below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;data = prepare_data(path=output_path, batch_size=6, imagery_type='naip', dataset_type='Classified_Tiles')

model = UnetClassifier(data, backbone='resnet34', ignore_classes=[0])

lr = model.lr_find()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Dec 2022 11:05:58 GMT</pubDate>
    <dc:creator>StanNoordman</dc:creator>
    <dc:date>2022-12-09T11:05:58Z</dc:date>
    <item>
      <title>Error when running UnetClassifier model</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-when-running-unetclassifier-model/m-p/1239559#M8138</link>
      <description>&lt;P&gt;I tried running a UnetClassifier model but i keep getting an error when trying to find the optimal learning rate. The error is as follows:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same&lt;/PRE&gt;&lt;P&gt;Now i found out that this means that the model is running on the gpu and my data is on the cpu. I used the prepare data function to create my data, and i can't find a option to get my data to prepare on GPU instead of CPU.&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;I am running my code in a notebook in arcgis pro version 3.0.2, the dataset i'm using is&amp;nbsp;&lt;A href="https://geosaurus.maps.arcgis.com/home/item.html?id=08ccd71f862940bda1d8350c8cc91a47" target="_self"&gt;land_cover_classification_using_sparse_training_data&lt;/A&gt;&amp;nbsp; and i'm running the code below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;data = prepare_data(path=output_path, batch_size=6, imagery_type='naip', dataset_type='Classified_Tiles')

model = UnetClassifier(data, backbone='resnet34', ignore_classes=[0])

lr = model.lr_find()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 11:05:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/error-when-running-unetclassifier-model/m-p/1239559#M8138</guid>
      <dc:creator>StanNoordman</dc:creator>
      <dc:date>2022-12-09T11:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: Error when running UnetClassifier model</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-when-running-unetclassifier-model/m-p/1241509#M8169</link>
      <description>&lt;P&gt;Does anyone have a solution for this problem?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 12:40:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/error-when-running-unetclassifier-model/m-p/1241509#M8169</guid>
      <dc:creator>StanNoordman</dc:creator>
      <dc:date>2022-12-15T12:40:34Z</dc:date>
    </item>
  </channel>
</rss>

