{ "cells": [ { "cell_type": "markdown", "id": "c7923002", "metadata": {}, "source": [ "# Demonstration of using Hugging Face vision transformer with skorch" ] }, { "cell_type": "markdown", "id": "7f915413", "metadata": {}, "source": [ "Based on this [blog post](https://huggingface.co/blog/fine-tune-vit), we show how with only a few lines of custom code, we can fine-tune a Vision Transformer model for a classification task." ] }, { "cell_type": "markdown", "id": "5ad2395e", "metadata": {}, "source": [ "In addition to installing torch and skorch, you need the `transformers` and `datasets` libraries:\n", "\n", " $ python -m pip install transformers datasets" ] }, { "cell_type": "markdown", "id": "830b6c67", "metadata": {}, "source": [ "
\n", "\n", " Run in Google Colab \n", " | \n", "View source on GitHub |