参考:https://rwightman.github.io/pytorch-image-models/

该库包含了很多种类的涉及图像模型,包括ViT。

安装

pip install timm
#或者
pip install git+https://github.com/rwightman/pytorch-image-models.git

读取模型

查看有哪些可用模型

查看有哪些 pre-trained模型可用:

import timm
from pprint import