Instructions to use ramanat1968/mnist-ann-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use ramanat1968/mnist-ann-model with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://ramanat1968/mnist-ann-model") - Notebooks
- Google Colab
- Kaggle
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
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support