zalando-datasets/fashion_mnist
Viewer โข Updated โข 70k โข 18.6k โข 69
Run c2p-cmd/fashion_mnist_tf on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs to fine-tune https://huggingface.co/c2p-cmd/fashion_mnist_tf. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/c2p-cmd/fashion_mnist_tf on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use c2p-cmd/fashion_mnist_tf with TF-Keras:
# Note: 'keras<3.x' or 'tf_keras' must be installed (legacy), and from_pretrained_keras was removed in huggingface_hub 1.0.
# See https://github.com/keras-team/tf-keras for more details.
# !pip install "huggingface_hub<1.0" tf_keras
from huggingface_hub import from_pretrained_keras
model = from_pretrained_keras("c2p-cmd/fashion_mnist_tf")
How to use c2p-cmd/fashion_mnist_tf with Keras:
# !pip install -U keras tensorflow huggingface_hub
# Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here;
# "jax" and "torch" also work for computation once TensorFlow is installed.
import os
os.environ["KERAS_BACKEND"] = "tensorflow"
import keras
model = keras.saving.load_model("hf://c2p-cmd/fashion_mnist_tf")
This is a neural network model trained to classify Fashion-MNIST images into 10 different clothing categories. The model uses a simple feedforward architecture with dense layers and achieves good performance on the Fashion-MNIST benchmark dataset.
The model was evaluated on the Fashion-MNIST test set with the following metrics:
This model is designed for:
import tensorflow as tf
# Load the model
model = tf.keras.models.load_model('fashion_mnist_model.h5')
# Prepare your image (28x28 grayscale, values 0-255)
# image = your_preprocessed_image
# Make prediction
prediction = model.predict(image.reshape(1, 28, 28))
predicted_class = tf.argmax(prediction, axis=1).numpy()[0]
The model was trained with: