tensorflow-deep-learning
Installation
SKILL.md
TensorFlow and Deep Learning
This skill covers project structure, model development, training, evaluation, and deployment practices for neural networks built with TensorFlow and Keras.
Workflow for Training and Shipping a Model
- Separate concerns into modules — Keep data loading, model definition, training, evaluation, and serving code in distinct files; treat notebooks as exploratory only.
- Build the input pipeline first — Use
tf.data.Datasetfor scalable, prefetching input processing; validate shapes, dtypes, label ranges, and class balance before writing any model code. - Split before any fitting — Create train/validation/test splits before fitting normalization statistics or augmentation parameters, to avoid leakage.
- Start with a tiny baseline — Build a small model and run a tiny overfit test (fit on a handful of examples until loss goes to ~0) to prove the training loop works before scaling up.
- Train with callbacks — Wire in
ModelCheckpoint(save best by validation metric, not final epoch),EarlyStopping, a learning-rate schedule, andTensorBoardlogging. - Evaluate with task-appropriate metrics — Use a held-out test set only for final reporting, never for tuning.
- Export with a explicit signature — Save with
model.export()ortf.saved_model.save()and define serving input signatures explicitly. - Smoke test the export — Load the exported model and run inference on sample inputs before deploying.