Instructions to use peft-internal-testing/tiny-random-ResNetForImageClassification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use peft-internal-testing/tiny-random-ResNetForImageClassification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="peft-internal-testing/tiny-random-ResNetForImageClassification") 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("peft-internal-testing/tiny-random-ResNetForImageClassification") model = AutoModelForImageClassification.from_pretrained("peft-internal-testing/tiny-random-ResNetForImageClassification") - Notebooks
- Google Colab
- Kaggle
| { | |
| "architectures": [ | |
| "ResNetForImageClassification" | |
| ], | |
| "depths": [ | |
| 1, | |
| 1, | |
| 2, | |
| 1 | |
| ], | |
| "downsample_in_bottleneck": false, | |
| "downsample_in_first_stage": false, | |
| "dtype": "float32", | |
| "embedding_size": 64, | |
| "embeddings_size": 10, | |
| "hidden_act": "relu", | |
| "hidden_sizes": [ | |
| 10, | |
| 20, | |
| 30, | |
| 40 | |
| ], | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1", | |
| "2": "LABEL_2" | |
| }, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1, | |
| "LABEL_2": 2 | |
| }, | |
| "layer_type": "bottleneck", | |
| "model_type": "resnet", | |
| "num_channels": 3, | |
| "out_features": [ | |
| "stage2", | |
| "stage3", | |
| "stage4" | |
| ], | |
| "out_indices": [ | |
| 2, | |
| 3, | |
| 4 | |
| ], | |
| "stage_names": [ | |
| "stem", | |
| "stage1", | |
| "stage2", | |
| "stage3", | |
| "stage4" | |
| ], | |
| "transformers_version": "5.0.0.dev0" | |
| } | |