?>Array ( [lang] => es [id] => 112 )
Scénario de test & Cas d'usage
No se requieren datos para la construcción del modelo, pero este código simula la creación de una tabla de metadatos de imágenes que se usaría para el entrenamiento.
| 1 | DATA WORK.product_images; |
| 2 | LENGTH image_path $200 label $50; |
| 3 | INPUT image_path $ label $; |
| 4 | DATALINES; |
| 5 | /images/prod_101.jpg camisa |
| 6 | /images/prod_102.jpg pantalon |
| 7 | /images/prod_103.jpg zapato |
| 8 | ; |
| 9 | RUN; |
| 1 | PROC CAS; |
| 2 | DEEPLEARN.buildModel / |
| 3 | model={name='Retail_CNN', replace=true}; |
| 4 | RUN; |
| 1 | DEEPLEARN.addLayer / |
| 2 | model='Retail_CNN' |
| 3 | name='Input_Layer' |
| 4 | layer={type='input', nChannels=3, width=128, height=128}; |
| 5 | RUN; |
| 1 | DEEPLEARN.addLayer / |
| 2 | model='Retail_CNN' |
| 3 | name='Conv1' |
| 4 | layer={type='convolution', nFilters=32, width=3, height=3, stride=1, act='relu'} |
| 5 | srcLayers={'Input_Layer'}; |
| 6 | RUN; |
| 1 | DEEPLEARN.addLayer / |
| 2 | model='Retail_CNN' |
| 3 | name='Pool1' |
| 4 | layer={type='pooling', pool='max', width=2, height=2, stride=2} |
| 5 | srcLayers={'Conv1'}; |
| 6 | RUN; |
| 1 | DEEPLEARN.addLayer / |
| 2 | model='Retail_CNN' |
| 3 | name='FC1' |
| 4 | layer={type='fullconnect', n=256, act='relu'} |
| 5 | srcLayers={'Pool1'}; |
| 6 | RUN; |
| 1 | DEEPLEARN.addLayer / |
| 2 | model='Retail_CNN' |
| 3 | name='Output_Layer' |
| 4 | layer={type='output', n=3, act='softmax'} |
| 5 | srcLayers={'FC1'}; |
| 6 | RUN; |
| 7 | QUIT; |
Se crea exitosamente un modelo llamado 'Retail_CNN' con una arquitectura de CNN válida. La tabla del modelo debe contener 6 capas conectadas secuencialmente: Input_Layer -> Conv1 -> Pool1 -> FC1 -> Output_Layer. La acción debe completarse sin errores, validando la construcción de una red estándar.