Deep Learning, Without the Fog: Models, Training, and Inference
A clear explanation of deep learning, neural-network layers, training, inference, generalisation, and deployment choices.
0xNN · · 7 min read
Deep Learning, Without the Fog: Models, Training, and Inference
AI is a broad label. Deep learning is one family of techniques inside it. The useful question is how a system learns a mapping from examples and how that mapping is used after training.
Traditional software encodes rules directly:
~text
input + rules → output
~
In machine learning, we choose a model family, provide examples, and optimise parameters so predictions become less wrong:
~text
input + learned parameters → prediction
~
Deep learning uses neural networks with multiple learned layers. Each layer transforms a representation; later layers combine earlier patterns into features useful for the task.
Training is not inference
During training, a model sees examples, calculates a loss, computes gradients, and updates parameters. During inference, parameters are fixed and the model produces a prediction for new input. Calling a hosted language-model API is inference, not training your own model.
That distinction affects cost, privacy, and expectations. A prompt changes context; it does not permanently rewrite model weights.
Generalisation is the hard part
A model can memorise training examples and still fail on new data. Hold out validation and test sets, check for leakage, compare with a simple baseline, and evaluate the cases users actually care about. Watch for class imbalance and distribution shift after launch.
Architecture matters, but data quality and evaluation matter just as much. Convolutional networks became common for images; transformers are widely used for language and sequence tasks. Neither label guarantees a useful product.
Practical developer choices
Use a pre-trained model when the problem is common and data is limited. Fine-tune or train only when you have a clear objective, representative data, evaluation criteria, and a maintenance plan. Start with the smallest model that meets the requirement; latency, memory, cost, and failure modes are product constraints.
Treat output as a prediction, not a fact. Add validation, confidence handling, human review for high-impact decisions, and a record of which model version produced the output.
Deep learning is powerful because layered representations learn patterns that are tedious to encode as rules. It does not remove the need for good data, testing, monitoring, and responsible deployment.
References
• Google ML: Neural networks
• Google ML: Training and test sets
• Deep Learning textbook
• NIST AI Risk Management Framework