What problem does it solve?
MATLAB deep learning code often relies on legacy or discouraged APIs (trainNetwork, patternnet, fitnet, DAGNetwork) that miss modern features, and dlaccelerate usage frequently suffers from silent tracing bugs that destroy performance or produce wrong results. This Skill guides AI agents to use the recommended R2024a+ APIs and correctly diagnose, fix, and apply dlaccelerate.
Core Features & Use Cases
- Modern training workflows: Train classifiers and regressors with trainnet, dlnetwork, fitcnet, and fitrnet, including multi-output networks, custom loss functions, and transfer learning via imagePretrainedNetwork.
- Legacy code migration: Convert patternnet, fitnet, narxnet, trainNetwork, DAGNetwork, and gensim code to recommended replacements with before/after examples.
- dlaccelerate diagnostics: Detect and fix tracing antipatterns (data-dependent branches, extractdata misuse, side effects), verify with HitRate/Occupancy/CheckMode, and measure speedup.
- Simulink export: Export trained networks using exportNetworkToSimulink or Predict blocks.
- Use Case: A user has a slow custom training loop with dlfeval/dlgradient. The Skill identifies antipatterns, wraps the function with dlaccelerate, verifies cache hit rates, and benchmarks the resulting speedup.
Quick Start
Ask the agent to train a neural network classifier on your tabular data in MATLAB and evaluate its accuracy on a test set.