Instructions to use spicecloud/spice-cnn-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use spicecloud/spice-cnn-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="spicecloud/spice-cnn-base", trust_remote_code=True) pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForImageClassification model = AutoModelForImageClassification.from_pretrained("spicecloud/spice-cnn-base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload model
Browse files- modeling_spice_cnn.py +1 -1
- pytorch_model.bin +2 -2
modeling_spice_cnn.py
CHANGED
|
@@ -26,7 +26,7 @@ class SpiceCNNModelForImageClassification(PreTrainedModel):
|
|
| 26 |
nn.ReLU(),
|
| 27 |
nn.MaxPool2d(kernel_size=config.pooling_size),
|
| 28 |
|
| 29 |
-
nn.Linear(64*
|
| 30 |
nn.ReLU(),
|
| 31 |
nn.Dropout(0.5),
|
| 32 |
nn.Linear(128, config.num_classes)
|
|
|
|
| 26 |
nn.ReLU(),
|
| 27 |
nn.MaxPool2d(kernel_size=config.pooling_size),
|
| 28 |
|
| 29 |
+
nn.Linear(64*2*2, 128),
|
| 30 |
nn.ReLU(),
|
| 31 |
nn.Dropout(0.5),
|
| 32 |
nn.Linear(128, config.num_classes)
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:27bc8f3fbf442d90430939e9d7d9569b01ddb1f98c7fd9a026784d6f01471b55
|
| 3 |
+
size 238972
|