Instructions to use facebook/deit-base-patch16-384 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use facebook/deit-base-patch16-384 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="facebook/deit-base-patch16-384") 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-base-patch16-384") model = AutoModelForImageClassification.from_pretrained("facebook/deit-base-patch16-384") - Notebooks
- Google Colab
- Kaggle
Add TF weights
Model converted by the transformers' pt_to_tf CLI. All converted model outputs and hidden layers were validated against its Pytorch counterpart.
Maximum crossload output difference=1.776e-05; Maximum crossload hidden layer difference=8.179e-03;
Maximum conversion output difference=1.776e-05; Maximum conversion hidden layer difference=8.179e-03;
List of maximum output differences above the threshold (1e-19):
logits: 1.776e-05
List of maximum hidden layer differences above the threshold (1e-19):
hidden_states[0]: 7.629e-06
hidden_states[1]: 4.530e-05
hidden_states[2]: 4.411e-05
hidden_states[3]: 3.362e-05
hidden_states[4]: 3.481e-05
hidden_states[5]: 8.488e-05
hidden_states[6]: 6.580e-04
hidden_states[7]: 1.301e-03
hidden_states[8]: 2.556e-03
hidden_states[9]: 2.979e-03
hidden_states[10]: 5.775e-03
hidden_states[11]: 8.179e-03
hidden_states[12]: 5.199e-03