Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

facebook
/
deit-small-patch16-224

Image Classification
Transformers
PyTorch
google-tensorflow TensorFlow
vit
Model card Files Files and versions
xet
Community
4

Instructions to use facebook/deit-small-patch16-224 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use facebook/deit-small-patch16-224 with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("image-classification", model="facebook/deit-small-patch16-224")
    pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")
    # Load model directly
    from transformers import AutoImageProcessor, AutoModelForImageClassification
    
    processor = AutoImageProcessor.from_pretrained("facebook/deit-small-patch16-224")
    model = AutoModelForImageClassification.from_pretrained("facebook/deit-small-patch16-224")
  • Inference
  • Notebooks
  • Google Colab
  • Kaggle
New discussion
Resources
  • PR & discussions documentation
  • Code of Conduct
  • Hub documentation

Adding `safetensors` variant of this model

#4 opened almost 3 years ago by
SFconvertbot

ValueError: The state dictionary of the model you are trying to load is corrupted. Are you sure it was properly saved?

1
#3 opened over 3 years ago by
abhishekmamdapure

Accuracy Drop

#2 opened over 3 years ago by
mhyatt000
Company
TOS Privacy About Careers
Website
Models Datasets Spaces Pricing Docs