task_categories:image-classification task_ids:multi-class-image-classification annotations_creators:expert-generated language_creators:found multilinguality:monolingual size_categories:10K<n<100K source_datasets:extended|other-nist language:en license:mit region:us
---
annotations_creators:
- expert-generated
language_creators:
- found
language:
- en
license:
- mit
multilinguality:
- monolingual
size_categories:
- 10K<n<100K
source_datasets:
- extended|other-nist
task_categories:
- image-classification
task_ids:
- multi-class-image-classification
paperswithcode_id: mnist
pretty_name: MNIST
dataset_info:
  features:
  - name: image
    dtype: image
  - name: label
    dtype:
      class_label:
        names:
          '0': '0'
          '1': '1'
          '2': '2'
          '3': '3'
          '4': '4'
          '5': '5'
          '6': '6'
          '7': '7'
          '8': '8'
          '9': '9'
  - name: embedding_foundation
    sequence: float32
  - name: embedding_ft
    sequence: float32
  - name: outlier_score_ft
    dtype: float64
  - name: outlier_score_foundation
    dtype: float64
  - name: nn_image
    struct:
    - name: bytes
      dtype: binary
    - name: path
      dtype: 'null'
  splits:
  - name: train
    num_bytes: 404136444.0
    num_examples: 60000
  download_size: 472581433
  dataset_size: 404136444.0
---
# Dataset Card for "mnist-outlier"

📚 This dataset is an enriched version of the [MNIST Dataset](http://yann.lecun.com/exdb/mnist/).

The workflow is described in the medium article: [Changes of Embeddings during Fine-Tuning of Transformers](https://medium.com/@markus.stoll/changes-of-embeddings-during-fine-tuning-c22aa1615921).

## Explore the Dataset

The open source data curation tool [Renumics Spotlight](https://github.com/Renumics/spotlight) allows you to explorer this dataset. You can find a Hugging Face Space running Spotlight with this dataset here: <https://huggingface.co/spaces/renumics/mnist-outlier>.
![Analyze with Spotlight](https://spotlight.renumics.com/resources/hf-mnist-outlier.png)



Or you can explorer it locally:

```python
!pip install renumics-spotlight datasets
from renumics import spotlight
import datasets

ds = datasets.load_dataset("renumics/mnist-outlier", split="train")
df = ds.rename_columns({"label":"labels"}).to_pandas()
df["label_str"] = df["labels"].apply(lambda x: ds.features["label"].int2str(x))
dtypes = {
    "nn_image": spotlight.Image,
    "image": spotlight.Image,
    "embedding_ft": spotlight.Embedding,
    "embedding_foundation": spotlight.Embedding,
}
spotlight.show(
    df,
    dtype=dtypes,
    layout="https://spotlight.renumics.com/resources/layout_pre_post_ft.json",
)
```