Instructions to use hf-internal-testing/tiny-random-EfficientFormerForImageClassificationWithTeacher with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hf-internal-testing/tiny-random-EfficientFormerForImageClassificationWithTeacher with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="hf-internal-testing/tiny-random-EfficientFormerForImageClassificationWithTeacher") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoModelForImageClassification model = AutoModelForImageClassification.from_pretrained("hf-internal-testing/tiny-random-EfficientFormerForImageClassificationWithTeacher", dtype="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "_name_or_path": "tiny_models/efficientformer/EfficientFormerForImageClassificationWithTeacher", | |
| "architectures": [ | |
| "EfficientFormerForImageClassificationWithTeacher" | |
| ], | |
| "attention_probs_dropout_prob": 0.1, | |
| "attention_ratio": 4, | |
| "batch_norm_eps": 1e-05, | |
| "depths": [ | |
| 2, | |
| 2, | |
| 2, | |
| 2 | |
| ], | |
| "dim": 128, | |
| "distillation": true, | |
| "downsample_pad": 1, | |
| "downsample_patch_size": 3, | |
| "downsample_stride": 2, | |
| "downsamples": [ | |
| true, | |
| true, | |
| true, | |
| true | |
| ], | |
| "drop_path_rate": 0.0, | |
| "encoder_stride": 2, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.1, | |
| "hidden_size": 128, | |
| "hidden_sizes": [ | |
| 16, | |
| 32, | |
| 64, | |
| 128 | |
| ], | |
| "image_size": 64, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 37, | |
| "key_dim": 32, | |
| "layer_norm_eps": 1e-12, | |
| "layer_scale_init_value": 1e-05, | |
| "mlp_expansion_ratio": 2, | |
| "model_type": "efficientformer", | |
| "num_attention_heads": 4, | |
| "num_channels": 3, | |
| "num_hidden_layers": 7, | |
| "num_meta3d_blocks": 1, | |
| "patch_size": 2, | |
| "pool_size": 3, | |
| "resolution": 2, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.30.0.dev0", | |
| "use_layer_scale": true | |
| } | |