Instructions to use hf-tiny-model-private/tiny-random-Swinv2ForImageClassification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hf-tiny-model-private/tiny-random-Swinv2ForImageClassification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="hf-tiny-model-private/tiny-random-Swinv2ForImageClassification") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("hf-tiny-model-private/tiny-random-Swinv2ForImageClassification") model = AutoModelForImageClassification.from_pretrained("hf-tiny-model-private/tiny-random-Swinv2ForImageClassification", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from hf-tiny-model-private/tiny-random-Swinv2ForImageClassification: direct link, hf CLI and curl.
- Browser
- Download file 736 Bytes
-
https://huggingface.co/hf-tiny-model-private/tiny-random-Swinv2ForImageClassification/resolve/76e817cec4fcf19a0bbc25941de951e3f8cc97d0/config.json
- Command line
-
hf download hf://hf-tiny-model-private/tiny-random-Swinv2ForImageClassification@76e817cec4fcf19a0bbc25941de951e3f8cc97d0/config.json
-
curl -L -o config.json https://huggingface.co/hf-tiny-model-private/tiny-random-Swinv2ForImageClassification/resolve/76e817cec4fcf19a0bbc25941de951e3f8cc97d0/config.json
736 Bytes
| { | |
| "architectures": [ | |
| "Swinv2ForImageClassification" | |
| ], | |
| "attention_probs_dropout_prob": 0.0, | |
| "depths": [ | |
| 1, | |
| 2, | |
| 1 | |
| ], | |
| "drop_path_rate": 0.1, | |
| "embed_dim": 16, | |
| "encoder_stride": 8, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.0, | |
| "hidden_size": 64, | |
| "image_size": 32, | |
| "initializer_range": 0.02, | |
| "layer_norm_eps": 1e-05, | |
| "mlp_ratio": 2.0, | |
| "model_type": "swinv2", | |
| "num_channels": 3, | |
| "num_heads": [ | |
| 2, | |
| 2, | |
| 4 | |
| ], | |
| "num_layers": 3, | |
| "patch_size": 2, | |
| "path_norm": true, | |
| "pretrained_window_sizes": [ | |
| 0, | |
| 0, | |
| 0, | |
| 0 | |
| ], | |
| "qkv_bias": true, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.28.0.dev0", | |
| "use_absolute_embeddings": false, | |
| "window_size": 2 | |
| } | |