MNIST Digit Recognition (ANN - TensorFlow/Keras)
This model is a simple Artificial Neural Network (ANN) trained on the MNIST dataset to classify handwritten digits (0โ9).
Architecture
- Input: 28x28 grayscale image
- Flatten layer
- Dense(128, ReLU)
- Dense(10, Softmax)
Training
- Dataset: MNIST
- Optimizer: Adam
- Loss: Sparse Categorical Crossentropy
- Epochs: 5
Performance
Achieves ~97โ98% test accuracy.
Usage
import tensorflow as tf
import numpy as np
model = tf.keras.models.load_model("mnist_ann_model.keras")
# Example input (28x28 image normalized)
sample = np.random.rand(1, 28, 28)
pred = model.predict(sample)
print(np.argmax(pred))
Notes
This is a beginner-friendly ANN model (not CNN).
- Downloads last month
- 23
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support