BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
rifcha
Fluorite | Level 6

Hello,

 

i have build and trained a convolutional neutral betwork with CASL.

Then i have exported my model with the dlExportModel action set but i don't understant how to use the output table.

Can somone tell me how to use the output table in a CNN ?

Do i have to use the dlImportModelWeights action set ? if yes how to use it ? 

The train model

 


proc cas; dlTrain / table={name='LargeImageDatashuffled', where='_PartInd_=1'} model='ConVNN' modelWeights={name='ConVTrainedWeights_d', replace=1} bestweights={name='ConVbestweights', replace=1} inputs='_image_' target='_label_' nominal={'_label_'} GPU=False ValidTable={name='LargeImageDatashuffled', where='_PartInd_=2'} optimizer={minibatchsize=80, algorithm={method='ADAM', lrpolicy='Step', gamma=0.6, stepsize=10, beta1=0.9, beta2=0.999, learningrate=.01} maxepochs=1} seed=12345 ; quit;

The export of my model




proc cas;
   dlExportModel /
      casout={name="ConVNN_save"}
      initWeights={name="ConVbestweights"}
      modelTable={name="ConVNN"};
run;


/*
Tables de sortie CAS
Bibliothèque CAS Nom
imagelib ConVNN_save
*/

SAS viya 3.5

Thanks for your help.

 

1 ACCEPTED SOLUTION

Accepted Solutions
bowmank
SAS Employee

The short answer is you need to use the Astore action set (or PROC ASTORE).

The dlExportModel action writes the table as an Astore (analytic store object). At this point the Astore table is still in memory. To download it to the client machine, use either the ASTORE.DOWNLOAD action or PROC ASTORE. Using the ASTORE action set and/or PROC ASTORE, you can also upload a saved model from client to server, describe the details of the model, and score data with the model.

 

The dlImportModel weights is really for importing weights from a model trained in Caffe or Keras.

 

View solution in original post

2 REPLIES 2
bowmank
SAS Employee

The short answer is you need to use the Astore action set (or PROC ASTORE).

The dlExportModel action writes the table as an Astore (analytic store object). At this point the Astore table is still in memory. To download it to the client machine, use either the ASTORE.DOWNLOAD action or PROC ASTORE. Using the ASTORE action set and/or PROC ASTORE, you can also upload a saved model from client to server, describe the details of the model, and score data with the model.

 

The dlImportModel weights is really for importing weights from a model trained in Caffe or Keras.

 

rifcha
Fluorite | Level 6

thanks for your help it work perfectly : 

my code bellow : 

/* export the model */
proc cas;
   dlExportModel /
      casout={name="HMEQ_DNN_Model",caslib="PUBLIC"}
      initWeights={name="ConVbestweights"}
      modelTable={name="ConVNN"};
run;

/*save my table */
proc astore;
   download rstore=PUBLIC.HMEQ_DNN_Model
            store="HMEQ_DNN_Model";
quit;

/*using astore procedure to score a new data set*/
proc astore;
   score data=mycas.SmallImageDatashuffled
         rstore=PUBLIC.HMEQ_DNN_Model
         out=mycas.hmeq1out;
quit;

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 890 views
  • 1 like
  • 2 in conversation