Instructions to use amaye15/aimv2-large-patch14-native-image-classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use amaye15/aimv2-large-patch14-native-image-classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="amaye15/aimv2-large-patch14-native-image-classification", trust_remote_code=True) pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoProcessor, AutoModelForImageClassification processor = AutoProcessor.from_pretrained("amaye15/aimv2-large-patch14-native-image-classification", trust_remote_code=True) model = AutoModelForImageClassification.from_pretrained("amaye15/aimv2-large-patch14-native-image-classification", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update modeling_aimv2.py
Browse files- modeling_aimv2.py +1 -0
modeling_aimv2.py
CHANGED
|
@@ -268,6 +268,7 @@ class AIMv2ForImageClassification(AIMv2PretrainedModel):
|
|
| 268 |
sequence_output = outputs[0]
|
| 269 |
|
| 270 |
logits = self.classifier(sequence_output[:, 0, :])
|
|
|
|
| 271 |
|
| 272 |
loss = None
|
| 273 |
if labels is not None:
|
|
|
|
| 268 |
sequence_output = outputs[0]
|
| 269 |
|
| 270 |
logits = self.classifier(sequence_output[:, 0, :])
|
| 271 |
+
print("LOGITS: ", logits)
|
| 272 |
|
| 273 |
loss = None
|
| 274 |
if labels is not None:
|