?>Array ( [lang] => fr [id] => 115 )
Scénario de test & Cas d'usage
Aucune donnée n'est nécessaire pour ce scénario. L'action `addLayer` opère sur une table de modèle en mémoire pour en construire l'architecture, avant la phase d'entraînement qui, elle, utilisera des données.
| 1 | /* L'action addLayer ne manipule pas de données d'entraînement directement. Elle construit la structure du modèle. */ |
| 1 | PROC CAS; |
| 2 | DEEPLEARN.buildModel / model={name='cnn_produits', replace=true}, type='CNN'; |
| 3 | DEEPLEARN.addLayer / modelTable={name='cnn_produits'}, name='entree', layer={type='input', nchannels=3, width=64, height=64, scale=1.0/255.0}; |
| 4 | QUIT; |
| 1 | PROC CAS; |
| 2 | DEEPLEARN.addLayer / modelTable={name='cnn_produits'}, name='conv1', layer={type='convolution', nFilters=32, width=3, height=3, act='relu'}, srcLayers={'entree'}; |
| 3 | DEEPLEARN.addLayer / modelTable={name='cnn_produits'}, name='pool1', layer={type='pooling', width=2, height=2, stride=2, pool='max'}, srcLayers={'conv1'}; |
| 4 | QUIT; |
| 1 | PROC CAS; |
| 2 | DEEPLEARN.addLayer / modelTable={name='cnn_produits'}, name='fc1', layer={type='fullconnect', n=128, act='relu', dropout=0.5}, srcLayers={'pool1'}; |
| 3 | QUIT; |
| 1 | PROC CAS; |
| 2 | DEEPLEARN.addLayer / modelTable={name='cnn_produits'}, name='sortie', layer={type='output', n=10, act='softmax'}, srcLayers={'fc1'}; |
| 3 | QUIT; |
Le modèle 'cnn_produits' est créé avec succès. Sa structure contient séquentiellement les couches 'entree', 'conv1', 'pool1', 'fc1', et 'sortie'. Chaque appel à l'action `addLayer` doit retourner une note de succès dans le log CAS, confirmant l'ajout de la couche spécifiée au graphe du modèle.