跳到正文
原文
Hugging Face Blog·· 2022-02-11AI 评分22

用 🤗 Transformers 微调 ViT 进行图像分类

Fine-Tune ViT for Image Classification with 🤗 Transformers

AI 导读

Hugging Face 发布教程,演示如何用 🤗 datasets 加载 beans 图像分类数据集,并借助 🤗 transformers 微调预训练 ViT 模型。教程使用 google/vit-base-patch16-224-in21k 及其配套 ViTImageProcessor,将图像处理为 (1, 3, 224, 224) 的 pixel_values 张量后送入模型训练。

来源:Hugging Face Blog · huggingface.co