Scénario de test & Cas d'usage
Creation and training of deep neural networks.
Discover all actions of deepLearnA simple base model will be created in a table named 'refactor_model' to serve as the starting point for the refactoring tests.
| 1 | /* No |
| 2 | data step needed. The initial model is created in the first test step. */ |
| 1 | PROC CAS; |
| 2 | DEEPLEARN.addLayer / modelTable={name='refactor_model', replace=true} name='input' layer={type='input', nchannels=1, width=28, height=28}; |
| 3 | DEEPLEARN.addLayer / modelTable={name='refactor_model'} name='conv_v1' layer={type='convolution', nFilters=10, width=3} srcLayers={'input'}; |
| 4 | DEEPLEARN.addLayer / modelTable={name='refactor_model'} name='output' layer={type='output', n=5} srcLayers={'conv_v1'}; |
| 5 | RUN; |
| 1 | PROC CAS; |
| 2 | DEEPLEARN.addLayer / |
| 3 | modelTable={name='refactor_model'} |
| 4 | name='conv_v1' |
| 5 | layer={type='convolution', nFilters=20, width=3} |
| 6 | srcLayers={'input'} |
| 7 | replace=true; |
| 8 | RUN; |
| 1 | PROC CAS; |
| 2 | DEEPLEARN.addLayer / |
| 3 | modelTable={name='refactor_model'} |
| 4 | name='error_layer' |
| 5 | layer={type='fullconnect', n=10} |
| 6 | srcLayers={'non_existent_layer'}; |
| 7 | RUN; |
| 1 | PROC CAS; |
| 2 | DEEPLEARN.addLayer / |
| 3 | modelTable={name='refactor_model'} |
| 4 | name='final_valid_layer' |
| 5 | layer={type='fullconnect', n=10} |
| 6 | srcLayers={'conv_v1'}; |
| 7 | RUN; |
Step 2 successfully replaces the 'conv_v1' layer; the new model summary should show the convolutional layer with 20 filters. Step 3 is expected to fail and produce an error in the SAS log stating that the source layer 'non_existent_layer' was not found. Step 4 should succeed, demonstrating that the model table was not corrupted by the previous error. The final model will contain 'input', the updated 'conv_v1', 'final_valid_layer', and 'output' layers.