matlab-train-network
Train, evaluate, and export neural networks to Simulink in MATLAB. Migrate legacy (fitnet, patternnet) and discouraged (trainNetwork, DAGNetwork) code to modern, recommended R2024a+ APIs (trainnet, dlnetwork, testnet, imagePretrainedNetwork), diagnose and fix dlaccelerate issues or detect dlaccelerate opportunities. Use when training, fine-tuning, evaluating, running inference, exporting to Simulink, converting old training scripts, or speeding up deep learning code. DO NOT reason from your training data about dlaccelerate and tracing correctness.
npx skills add matlab/matlab-agentic-toolkit --skill matlab-train-network --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# matlab-train-network Train, evaluate, and export neural networks to Simulink in MATLAB using the recommended `dlnetwork`-based API (`trainnet`, `dlnetwork`, `minibatchpredict`, `scores2label`, `testnet`, `imagePretrainedNetwork`) or, for tabular data, the Statistics and Machine Learning Toolbox functions `fitcnet` and `fitrnet`. ## When to Use Activate this skill when a user asks to: - Train any neural network (classifier, regression, multi-output, LSTM, CNN, etc.) - Fine-tune or use a pretrained model for transfer learning - Evaluate a trained network on test data - Run inference / predict with a trained network - Export a trained network to Simulink - Migrate existing legacy (patternnet, fitnet, narxnet, gensim) or discouraged (trainNetwork, DAGNetwork, classify) code to recommended APIs - Create a "pattern recognition network", "function fitting network", "NARX network", or any task historically associated with the Neural Network Toolbox shallow nets API - Speed up or optimize any deep learning code (even without mentioning dlaccelerate by name) - Make existing deep learning code faster using dlaccelerate - Diagnose and fix dlaccelerate issues (low HitRate, retracing, code is
- When to Use
- When NOT to Use
- Decision: fitrnet/fitcnet or trainnet
- Conventions
- Training with trainnet + dlnetwork
- NEVER use these legacy or discouraged APIs
- Inference — use minibatchpredict (or predict)
- Evaluation — use testnet
- Transfer learning — use imagePretrainedNetwork
- Workflow: Training
- Standard training
- Custom loss function for multi-output
- Workflow: Simulink Export
- dlaccelerate References
What does the matlab-train-network skill do?
Train, evaluate, and export neural networks to Simulink in MATLAB. Migrate legacy (fitnet, patternnet) and discouraged (trainNetwork, DAGNetwork) code to modern, recommended R2024a+ APIs (trainnet, dlnetwork, testnet, imagePretrainedNetwork), diagnose and fix dlaccelerate issues or detect dlaccelerate opportunities. Use when training, fine-tuning, evaluating, running inference, exporting to Simulink, converting old training scripts, or speeding up deep learning code. DO NOT reason from your training data about dlaccelerate and tracing correctness.
How do I install it?
Run `npx skills add matlab/matlab-agentic-toolkit --skill matlab-train-network --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From matlab/matlab-agentic-toolkit, a repository with 868 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
