What is Keras?
Keras is a high-level Python API for building and
training neural networks. You describe a model as a
stack (or graph) of layers — Input, Dense, Concatenate, etc. — then call
compile() and fit() to train it with data.
Keras focuses on being easy to use: the same few concepts (model, layer, optimizer, loss, metrics) apply whether you are doing a tiny linear regression or a deep CNN. See Neural Networks.
Keras & TensorFlow (updated)
Your old page listed Theano and CNTK — those backends are obsolete. Today:
-
Keras 3 is a standalone package (
pip install keras) with a multi-backend design — it can run on TensorFlow, JAX, or PyTorch. -
In many tutorials (including Google Colab MLCC), you still see
import kerasortf.keras— both are the same Keras API; Colab ships TensorFlow with Keras built in. - See also: TensorFlow.
Neural networks (Keras) vs traditional ML (scikit-learn)
| Neural networks (Keras) | Traditional ML | |
|---|---|---|
| Typical library | Keras / TensorFlow | scikit-learn |
| Structure | Layers of connected units (neurons) | Algorithm-specific (trees, SVM, linear models, etc.) — see ML algorithms |
| Training | Gradient descent over many epochs (model.fit) |
Often faster closed-form or single-pass fits on tabular data |
| When to use | Images, text, audio, large datasets, custom architectures, deep non-linear models | Small/medium tabular data, interpretability, quick baselines (RandomForest, LinearRegression) |
| Example | Taxi fare linear regression in Keras (learning exercise; sklearn would also work) | Calorie predictor (Decision Tree) |
Next: Layers & APIs (Sequential vs Functional) → Build & train a Keras model (Colab taxi lab)