<?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: How to implement a LSTM Autoencoder model in CAS on Viya? in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-implement-a-LSTM-Autoencoder-model-in-CAS-on-Viya/m-p/614939#M8113</link>
    <description>&lt;P&gt;I'm looking at "layers" and "layersOut" but it's not working, the output is weird with columns like "_layeract_0_img_0_" which contain characters. It seems something related to images but my model has nothing to do with images. What's wrong? Any help?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: Even with the example I couldn't find a way to see all the layers values row by row:&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=casdlpg&amp;amp;docsetTarget=p024gf3bj0rmwcn1tfkyy68dzs4g.htm&amp;amp;docsetVersion=8.5&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=casdlpg&amp;amp;docsetTarget=p024gf3bj0rmwcn1tfkyy68dzs4g.htm&amp;amp;docsetVersion=8.5&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Fri, 03 Jan 2020 11:33:31 GMT</pubDate>
    <dc:creator>Edoedoedo</dc:creator>
    <dc:date>2020-01-03T11:33:31Z</dc:date>
    <item>
      <title>How to implement a LSTM Autoencoder model in CAS on Viya?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-implement-a-LSTM-Autoencoder-model-in-CAS-on-Viya/m-p/612610#M8096</link>
      <description>&lt;P&gt;I need to implement a LSTM Autoencoder neural network in CAS. How can it be done?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://towardsdatascience.com/step-by-step-understanding-lstm-autoencoder-layers-ffab055b6352" target="_blank"&gt;https://towardsdatascience.com/step-by-step-understanding-lstm-autoencoder-layers-ffab055b6352&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 10:40:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-implement-a-LSTM-Autoencoder-model-in-CAS-on-Viya/m-p/612610#M8096</guid>
      <dc:creator>Edoedoedo</dc:creator>
      <dc:date>2019-12-18T10:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement a LSTM Autoencoder model in CAS on Viya?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-implement-a-LSTM-Autoencoder-model-in-CAS-on-Viya/m-p/612731#M8097</link>
      <description>&lt;P&gt;This might help (includes link to code in GitHub):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Autoencoder-analysis-using-PROC-NNET-and-neuralNet-action-set/ta-p/447135" target="_self"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Autoencoder-analysis-using-PROC-NNET-and-neuralNet-action-set/ta-p/447135&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 16:27:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-implement-a-LSTM-Autoencoder-model-in-CAS-on-Viya/m-p/612731#M8097</guid>
      <dc:creator>WendyCzika</dc:creator>
      <dc:date>2019-12-18T16:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement a LSTM Autoencoder model in CAS on Viya?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-implement-a-LSTM-Autoencoder-model-in-CAS-on-Viya/m-p/612760#M8098</link>
      <description>&lt;P&gt;Thanks, however nnet seems to support only the standard Autoencoder and not the LSTM form.&lt;/P&gt;
&lt;P&gt;I believe the model should be created "by hand" layer per layer with the&amp;nbsp;&lt;SPAN&gt;deepLearn action set, but I don't know how to implement it.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 18:25:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-implement-a-LSTM-Autoencoder-model-in-CAS-on-Viya/m-p/612760#M8098</guid>
      <dc:creator>Edoedoedo</dc:creator>
      <dc:date>2019-12-18T18:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement a LSTM Autoencoder model in CAS on Viya?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-implement-a-LSTM-Autoencoder-model-in-CAS-on-Viya/m-p/612774#M8099</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/5590"&gt;@Edoedoedo&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The documentation &lt;A href="https://go.documentation.sas.com/?docsetId=casdlpg&amp;amp;docsetTarget=p0qpwz49ax3l6wn1i8mzljb4zi4y.htm&amp;amp;docsetVersion=8.5&amp;amp;locale=en" target="_self"&gt;has an example&lt;/A&gt; of using the deepLearn action set to build a recurrent neural network.&amp;nbsp; It does not build the specific architecture that you are interested in, but it will give you a good idea of the code and mechanics behind it, and you can reference the &lt;A href="https://go.documentation.sas.com/?docsetId=casdlpg&amp;amp;docsetVersion=8.5&amp;amp;docsetTarget=cas-deeplearn-addlayer.htm&amp;amp;locale=en" target="_self"&gt;syntax for the addLayer action&lt;/A&gt; to tweak the code to fit your needs.&amp;nbsp; For example, for recurrent layers, you can specify rnnType="LSTM" for those layers.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is also a &lt;A href="https://blogs.sas.com/content/subconsciousmusings/2018/04/20/how-to-build-deep-learning-models-with-sas/" target="_self"&gt;nice blog&lt;/A&gt; that provides a high-level overview of the steps involved with training deep learning models with SAS that may also be helpful.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hopefully these resources are helpful!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Brian&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 19:02:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-implement-a-LSTM-Autoencoder-model-in-CAS-on-Viya/m-p/612774#M8099</guid>
      <dc:creator>BrianGaines</dc:creator>
      <dc:date>2019-12-18T19:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement a LSTM Autoencoder model in CAS on Viya?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-implement-a-LSTM-Autoencoder-model-in-CAS-on-Viya/m-p/613726#M8100</link>
      <description>&lt;P&gt;Thanks a lot!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just as an exercise I'm trying to recreate the standard MLP Autoencoder. Here's what I did:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;cas session sessopts=(caslib="CASUSER");
libname CASUSER cas caslib="CASUSER";

data CASUSER.TRAIN;
    do id=1 to 10000;
        x=id/10000; &lt;BR /&gt;        /* Fake relation */
        y=x+2;
        z=x*2-sqrt(x);
        output;
    end;
run;

data CASUSER.SCORE;
    set CASUSER.TRAIN;
    if id = 1 then z=z*10; /* anomaly */
    if id &amp;gt; 10 then delete;
run;

proc cas;
    deepLearn.buildModel /
        modelTable={name="MODELTABLE" replace=true}
        type="DNN";
    run;
      
    deepLearn.addLayer /
        layer={type="INPUT" std="STD"}
        modelTable={name="MODELTABLE"}
        name="LInput";
    run;
    
    deepLearn.addLayer /
        layer={type="FC" n=1}
        modelTable={name="MODELTABLE"}
        name="LHidden"
        srcLayers="LInput";
    run;
    
    deepLearn.addLayer /
        layer={type="OUTPUT"}
        modelTable={name="MODELTABLE"}
        name="LOutput"
        srcLayers="LHidden";
    run; 
    
    deepLearn.modelInfo / 
        modelTable={name="MODELTABLE"};
    run;
    
    deepLearn.dlTrain /
        inputs={"x" "y" "z"}
        modelTable={name="MODELTABLE"}
        modelWeights={name="MODELWEIGHTS" replace=true}
        table={name="TRAIN"}
        optimizer={loglevel=1};
    run;
quit;

proc cas;
    deepLearn.dlScore /
        initWeights={name="MODELWEIGHTS"}
        modelTable={name="MODELTABLE"}
        table={name="SCORE"}
        casout={name="SCORED" replace=true}
        copyvars={"id"};
   run;
quit;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However I can't see the scored layers values to calculate the mse row by row. What am I doing wrong? Is this simple code correct?&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Dec 2019 12:18:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-implement-a-LSTM-Autoencoder-model-in-CAS-on-Viya/m-p/613726#M8100</guid>
      <dc:creator>Edoedoedo</dc:creator>
      <dc:date>2019-12-24T12:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement a LSTM Autoencoder model in CAS on Viya?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-implement-a-LSTM-Autoencoder-model-in-CAS-on-Viya/m-p/614939#M8113</link>
      <description>&lt;P&gt;I'm looking at "layers" and "layersOut" but it's not working, the output is weird with columns like "_layeract_0_img_0_" which contain characters. It seems something related to images but my model has nothing to do with images. What's wrong? Any help?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: Even with the example I couldn't find a way to see all the layers values row by row:&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=casdlpg&amp;amp;docsetTarget=p024gf3bj0rmwcn1tfkyy68dzs4g.htm&amp;amp;docsetVersion=8.5&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=casdlpg&amp;amp;docsetTarget=p024gf3bj0rmwcn1tfkyy68dzs4g.htm&amp;amp;docsetVersion=8.5&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2020 11:33:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-implement-a-LSTM-Autoencoder-model-in-CAS-on-Viya/m-p/614939#M8113</guid>
      <dc:creator>Edoedoedo</dc:creator>
      <dc:date>2020-01-03T11:33:31Z</dc:date>
    </item>
  </channel>
</rss>

