Scénario de test & Cas d'usage
Creation and training of deep neural networks.
Discover all actions of deepLearnThis scenario focuses on building the complex model architecture. We will create an empty model table named 'siamese_signature_model'.
| 1 | /* Model architecture test. No |
| 2 | data step needed. */ |
| 1 | PROC CAS; |
| 2 | DEEPLEARN.addLayer / modelTable={name='siamese_signature_model', replace=true} name='input_ref' layer={type='input', nchannels=1, width=150, height=50}; |
| 3 | DEEPLEARN.addLayer / modelTable={name='siamese_signature_model'} name='input_new' layer={type='input', nchannels=1, width=150, height=50}; |
| 4 | RUN; |
| 1 | PROC CAS; |
| 2 | DEEPLEARN.addLayer / modelTable={name='siamese_signature_model'} name='conv1_ref' layer={type='convolution', nFilters=8, width=5, act='relu'} srcLayers={'input_ref'}; |
| 3 | DEEPLEARN.addLayer / modelTable={name='siamese_signature_model'} name='pool1_ref' layer={type='pooling', width=2, pool='max'} srcLayers={'conv1_ref'}; |
| 4 | RUN; |
| 1 | PROC CAS; |
| 2 | DEEPLEARN.addLayer / |
| 3 | modelTable={name='siamese_signature_model'} |
| 4 | name='conv1_new' |
| 5 | layer={type='convolution', nFilters=8, width=5, act='relu'} |
| 6 | srcLayers={'input_new'} |
| 7 | sharingWeights='conv1_ref'; |
| 8 | RUN; |
| 1 | PROC CAS; |
| 2 | DEEPLEARN.addLayer / |
| 3 | modelTable={name='siamese_signature_model'} |
| 4 | name='pool1_new' |
| 5 | layer={type='pooling', width=2, pool='max'} |
| 6 | srcLayers={'conv1_new'} |
| 7 | sharingWeights='pool1_ref'; |
| 8 | RUN; |
| 1 | PROC CAS; |
| 2 | DEEPLEARN.addLayer / |
| 3 | modelTable={name='siamese_signature_model'} |
| 4 | name='concat_features' |
| 5 | layer={type='concat'} |
| 6 | srcLayers={'pool1_ref', 'pool1_new'}; |
| 7 | RUN; |
A Siamese network architecture is created in the 'siamese_signature_model' table. The model summary should show two input layers and two parallel branches ('conv1_ref'/'pool1_ref' and 'conv1_new'/'pool1_new') whose outputs are merged by the 'concat_features' layer. The model definition should confirm that 'conv1_new' shares weights with 'conv1_ref'.