TensorFlow Template
The TensorFlow template scaffolds a production-ready ML project with TensorFlow, Keras, and common ML dependencies. Two variants are available:tensorflow: basic inference template for deploymenttensorflow-train: full training pipeline withModelCheckpointandEarlyStoppingcallbacks
Quick Start
cirron init.
Project Structure
Dockerfile, .gitignore, README.md, .env.example, tests), see Common files.
Cirron-specific bits
cirron.yaml
Profiling hooks
The generatedtrain.py and inference.py integrate with the Cirron SDK. Call ci.profile() once before training begins; the Keras callback auto-registers and tracks model.fit:
requirements.txt
Model Types
- Classification:
sparse_categorical_crossentropyloss, softmax output, accuracy metric. Default architecture is a small CNN. - Regression:
mseloss, linear output, MAE metric. Default architecture is a KerasSequentialMLP.
cirron init prompt selects which one is generated into src/model.py via create_model().
Built-in Callbacks
The generatedtrain.py wires standard Keras callbacks:
ModelCheckpoint: saves best model by validation loss tocheckpoints/best_model.h5EarlyStopping: stops training when val loss stops improving (patience=5)
ReduceLROnPlateau) in get_callbacks().
Usage
GPU Support
TensorFlow automatically detects available GPUs. Thetensorflow-train variant supports mixed-precision training:
Next Steps
PyTorch Template
Alternative deep learning framework
scikit-learn Template
Traditional ML algorithms
Common files
Dockerfile, tests, and shared scaffolding
Deployment
Deploy your trained model