Instructions to use kd13/Modern-MobileNet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kd13/Modern-MobileNet with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="kd13/Modern-MobileNet", trust_remote_code=True) pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoModelForImageClassification model = AutoModelForImageClassification.from_pretrained("kd13/Modern-MobileNet", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update modeling_mobilenet.py
Browse files- modeling_mobilenet.py +1 -1
modeling_mobilenet.py
CHANGED
|
@@ -3,7 +3,7 @@ import torch.nn as nn
|
|
| 3 |
from transformers import PreTrainedModel
|
| 4 |
from transformers.modeling_outputs import ImageClassifierOutput
|
| 5 |
|
| 6 |
-
from configuration_mobilenet import MobileNetV1Config
|
| 7 |
|
| 8 |
class FP32LayerNorm2d(nn.GroupNorm):
|
| 9 |
def __init__(self, num_channels):
|
|
|
|
| 3 |
from transformers import PreTrainedModel
|
| 4 |
from transformers.modeling_outputs import ImageClassifierOutput
|
| 5 |
|
| 6 |
+
from .configuration_mobilenet import MobileNetV1Config
|
| 7 |
|
| 8 |
class FP32LayerNorm2d(nn.GroupNorm):
|
| 9 |
def __init__(self, num_channels):
|