Instructions to use dsaint31/bb_mlp_224 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dsaint31/bb_mlp_224 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="dsaint31/bb_mlp_224") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("dsaint31/bb_mlp_224", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add/Update backbone checkpoints (count=6)
Browse files- ds_cfg.py +7 -0
- ds_model.py +4 -1
- ds_proc.py +6 -1
- manifest_20260210_170738.json +53 -0
- models/google__efficientnet-b0/config.json +1 -1
- models/google__efficientnet-b0/ds_cfg.py +7 -0
- models/google__efficientnet-b0/ds_model.py +4 -1
- models/google__efficientnet-b0/ds_proc.py +6 -1
- models/google__efficientnet-b0/model.safetensors +1 -1
- models/google__vit-base-patch16-224/config.json +1 -1
- models/google__vit-base-patch16-224/ds_cfg.py +7 -0
- models/google__vit-base-patch16-224/ds_model.py +4 -1
- models/google__vit-base-patch16-224/ds_proc.py +6 -1
- models/google__vit-base-patch16-224/model.safetensors +1 -1
- models/microsoft__resnet-50/config.json +1 -1
- models/microsoft__resnet-50/ds_cfg.py +7 -0
- models/microsoft__resnet-50/ds_model.py +4 -1
- models/microsoft__resnet-50/ds_proc.py +6 -1
- models/microsoft__resnet-50/model.safetensors +1 -1
- models/microsoft__swin-tiny-patch4-window7-224/config.json +1 -1
- models/microsoft__swin-tiny-patch4-window7-224/ds_cfg.py +7 -0
- models/microsoft__swin-tiny-patch4-window7-224/ds_model.py +4 -1
- models/microsoft__swin-tiny-patch4-window7-224/ds_proc.py +6 -1
- models/microsoft__swin-tiny-patch4-window7-224/model.safetensors +1 -1
- models/timm__densenet121.tv_in1k/config.json +1 -1
- models/timm__densenet121.tv_in1k/ds_cfg.py +7 -0
- models/timm__densenet121.tv_in1k/ds_model.py +4 -1
- models/timm__densenet121.tv_in1k/ds_proc.py +6 -1
- models/timm__densenet121.tv_in1k/model.safetensors +1 -1
- models/torchvision__densenet121/config.json +1 -1
- models/torchvision__densenet121/ds_cfg.py +7 -0
- models/torchvision__densenet121/ds_model.py +4 -1
- models/torchvision__densenet121/ds_proc.py +6 -1
- models/torchvision__densenet121/model.safetensors +1 -1
ds_cfg.py
CHANGED
|
@@ -1,6 +1,13 @@
|
|
| 1 |
from transformers import PretrainedConfig
|
| 2 |
from typing import Literal, Any
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
# ============================================================
|
| 5 |
# Backbone whitelist + meta registry
|
| 6 |
# ============================================================
|
|
|
|
| 1 |
from transformers import PretrainedConfig
|
| 2 |
from typing import Literal, Any
|
| 3 |
|
| 4 |
+
__all__ = [
|
| 5 |
+
"BackboneID",
|
| 6 |
+
"BACKBONE_META",
|
| 7 |
+
"BackboneMLPHeadConfig",
|
| 8 |
+
]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
# ============================================================
|
| 12 |
# Backbone whitelist + meta registry
|
| 13 |
# ============================================================
|
ds_model.py
CHANGED
|
@@ -17,7 +17,10 @@ from transformers.modeling_outputs import ImageClassifierOutput
|
|
| 17 |
# --- torchvision ---
|
| 18 |
from torchvision import models as tv_models
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
| 21 |
# from mlp_head import MLPHead
|
| 22 |
|
| 23 |
class MLPHead(nn.Module):
|
|
|
|
| 17 |
# --- torchvision ---
|
| 18 |
from torchvision import models as tv_models
|
| 19 |
|
| 20 |
+
try:
|
| 21 |
+
from .ds_cfg import BackboneMLPHeadConfig, BACKBONE_META
|
| 22 |
+
except ImportError:
|
| 23 |
+
from ds_cfg import BackboneMLPHeadConfig, BACKBONE_META
|
| 24 |
# from mlp_head import MLPHead
|
| 25 |
|
| 26 |
class MLPHead(nn.Module):
|
ds_proc.py
CHANGED
|
@@ -16,7 +16,12 @@ from transformers import AutoImageProcessor, AutoConfig
|
|
| 16 |
from transformers.image_processing_base import ImageProcessingMixin
|
| 17 |
from transformers.utils.generic import TensorType
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
|
| 22 |
class BackboneMLPHead224ImageProcessor(ImageProcessingMixin):
|
|
|
|
| 16 |
from transformers.image_processing_base import ImageProcessingMixin
|
| 17 |
from transformers.utils.generic import TensorType
|
| 18 |
|
| 19 |
+
try:
|
| 20 |
+
# Hub/Colab: dynamic module ๋ก๋ฉ์์๋ ์๋ import๊ฐ ์ ์
|
| 21 |
+
from .ds_cfg import BackboneID, BACKBONE_META
|
| 22 |
+
except ImportError:
|
| 23 |
+
# ๋ก์ปฌ: python script.py ๋๋ top-level import์์๋ ์ ๋ import๋ก fallback
|
| 24 |
+
from ds_cfg import BackboneID, BACKBONE_META
|
| 25 |
|
| 26 |
|
| 27 |
class BackboneMLPHead224ImageProcessor(ImageProcessingMixin):
|
manifest_20260210_170738.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"timestamp": "20260210_170738",
|
| 3 |
+
"repo_id": "dsaint31/bb_mlp_224",
|
| 4 |
+
"revision": "main",
|
| 5 |
+
"tag": null,
|
| 6 |
+
"num_labels": 3,
|
| 7 |
+
"build_device": "mps",
|
| 8 |
+
"count": 6,
|
| 9 |
+
"items": [
|
| 10 |
+
{
|
| 11 |
+
"backbone": "google/vit-base-patch16-224",
|
| 12 |
+
"subdir": "models/google__vit-base-patch16-224",
|
| 13 |
+
"dirname": "google__vit-base-patch16-224"
|
| 14 |
+
},
|
| 15 |
+
{
|
| 16 |
+
"backbone": "microsoft/swin-tiny-patch4-window7-224",
|
| 17 |
+
"subdir": "models/microsoft__swin-tiny-patch4-window7-224",
|
| 18 |
+
"dirname": "microsoft__swin-tiny-patch4-window7-224"
|
| 19 |
+
},
|
| 20 |
+
{
|
| 21 |
+
"backbone": "microsoft/resnet-50",
|
| 22 |
+
"subdir": "models/microsoft__resnet-50",
|
| 23 |
+
"dirname": "microsoft__resnet-50"
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"backbone": "google/efficientnet-b0",
|
| 27 |
+
"subdir": "models/google__efficientnet-b0",
|
| 28 |
+
"dirname": "google__efficientnet-b0"
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"backbone": "timm/densenet121.tv_in1k",
|
| 32 |
+
"subdir": "models/timm__densenet121.tv_in1k",
|
| 33 |
+
"dirname": "timm__densenet121.tv_in1k"
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"backbone": "torchvision/densenet121",
|
| 37 |
+
"subdir": "models/torchvision__densenet121",
|
| 38 |
+
"dirname": "torchvision__densenet121"
|
| 39 |
+
}
|
| 40 |
+
],
|
| 41 |
+
"root_code_included": true,
|
| 42 |
+
"root_code_files": [
|
| 43 |
+
"ds_proc.py",
|
| 44 |
+
"ds_model.py",
|
| 45 |
+
"ds_cfg.py"
|
| 46 |
+
],
|
| 47 |
+
"subfolder_code_included": true,
|
| 48 |
+
"subfolder_code_files": [
|
| 49 |
+
"ds_proc.py",
|
| 50 |
+
"ds_model.py",
|
| 51 |
+
"ds_cfg.py"
|
| 52 |
+
]
|
| 53 |
+
}
|
models/google__efficientnet-b0/config.json
CHANGED
|
@@ -24,7 +24,7 @@
|
|
| 24 |
"num_labels": 3,
|
| 25 |
"transformers_version": "5.1.0",
|
| 26 |
"ds_provenance": {
|
| 27 |
-
"created_at": "
|
| 28 |
"repo_id": "dsaint31/bb_mlp_224",
|
| 29 |
"subdir": "models/google__efficientnet-b0",
|
| 30 |
"wrapper_class": "BackboneWithMLPHeadForImageClassification",
|
|
|
|
| 24 |
"num_labels": 3,
|
| 25 |
"transformers_version": "5.1.0",
|
| 26 |
"ds_provenance": {
|
| 27 |
+
"created_at": "20260210_170738",
|
| 28 |
"repo_id": "dsaint31/bb_mlp_224",
|
| 29 |
"subdir": "models/google__efficientnet-b0",
|
| 30 |
"wrapper_class": "BackboneWithMLPHeadForImageClassification",
|
models/google__efficientnet-b0/ds_cfg.py
CHANGED
|
@@ -1,6 +1,13 @@
|
|
| 1 |
from transformers import PretrainedConfig
|
| 2 |
from typing import Literal, Any
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
# ============================================================
|
| 5 |
# Backbone whitelist + meta registry
|
| 6 |
# ============================================================
|
|
|
|
| 1 |
from transformers import PretrainedConfig
|
| 2 |
from typing import Literal, Any
|
| 3 |
|
| 4 |
+
__all__ = [
|
| 5 |
+
"BackboneID",
|
| 6 |
+
"BACKBONE_META",
|
| 7 |
+
"BackboneMLPHeadConfig",
|
| 8 |
+
]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
# ============================================================
|
| 12 |
# Backbone whitelist + meta registry
|
| 13 |
# ============================================================
|
models/google__efficientnet-b0/ds_model.py
CHANGED
|
@@ -17,7 +17,10 @@ from transformers.modeling_outputs import ImageClassifierOutput
|
|
| 17 |
# --- torchvision ---
|
| 18 |
from torchvision import models as tv_models
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
| 21 |
# from mlp_head import MLPHead
|
| 22 |
|
| 23 |
class MLPHead(nn.Module):
|
|
|
|
| 17 |
# --- torchvision ---
|
| 18 |
from torchvision import models as tv_models
|
| 19 |
|
| 20 |
+
try:
|
| 21 |
+
from .ds_cfg import BackboneMLPHeadConfig, BACKBONE_META
|
| 22 |
+
except ImportError:
|
| 23 |
+
from ds_cfg import BackboneMLPHeadConfig, BACKBONE_META
|
| 24 |
# from mlp_head import MLPHead
|
| 25 |
|
| 26 |
class MLPHead(nn.Module):
|
models/google__efficientnet-b0/ds_proc.py
CHANGED
|
@@ -16,7 +16,12 @@ from transformers import AutoImageProcessor, AutoConfig
|
|
| 16 |
from transformers.image_processing_base import ImageProcessingMixin
|
| 17 |
from transformers.utils.generic import TensorType
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
|
| 22 |
class BackboneMLPHead224ImageProcessor(ImageProcessingMixin):
|
|
|
|
| 16 |
from transformers.image_processing_base import ImageProcessingMixin
|
| 17 |
from transformers.utils.generic import TensorType
|
| 18 |
|
| 19 |
+
try:
|
| 20 |
+
# Hub/Colab: dynamic module ๋ก๋ฉ์์๋ ์๋ import๊ฐ ์ ์
|
| 21 |
+
from .ds_cfg import BackboneID, BACKBONE_META
|
| 22 |
+
except ImportError:
|
| 23 |
+
# ๋ก์ปฌ: python script.py ๋๋ top-level import์์๋ ์ ๋ import๋ก fallback
|
| 24 |
+
from ds_cfg import BackboneID, BACKBONE_META
|
| 25 |
|
| 26 |
|
| 27 |
class BackboneMLPHead224ImageProcessor(ImageProcessingMixin):
|
models/google__efficientnet-b0/model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 17558436
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0069437f45965e8c4ac06831d6e34c4ba7603bf246b37eef446730ec04bf4e5d
|
| 3 |
size 17558436
|
models/google__vit-base-patch16-224/config.json
CHANGED
|
@@ -24,7 +24,7 @@
|
|
| 24 |
"num_labels": 3,
|
| 25 |
"transformers_version": "5.1.0",
|
| 26 |
"ds_provenance": {
|
| 27 |
-
"created_at": "
|
| 28 |
"repo_id": "dsaint31/bb_mlp_224",
|
| 29 |
"subdir": "models/google__vit-base-patch16-224",
|
| 30 |
"wrapper_class": "BackboneWithMLPHeadForImageClassification",
|
|
|
|
| 24 |
"num_labels": 3,
|
| 25 |
"transformers_version": "5.1.0",
|
| 26 |
"ds_provenance": {
|
| 27 |
+
"created_at": "20260210_170738",
|
| 28 |
"repo_id": "dsaint31/bb_mlp_224",
|
| 29 |
"subdir": "models/google__vit-base-patch16-224",
|
| 30 |
"wrapper_class": "BackboneWithMLPHeadForImageClassification",
|
models/google__vit-base-patch16-224/ds_cfg.py
CHANGED
|
@@ -1,6 +1,13 @@
|
|
| 1 |
from transformers import PretrainedConfig
|
| 2 |
from typing import Literal, Any
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
# ============================================================
|
| 5 |
# Backbone whitelist + meta registry
|
| 6 |
# ============================================================
|
|
|
|
| 1 |
from transformers import PretrainedConfig
|
| 2 |
from typing import Literal, Any
|
| 3 |
|
| 4 |
+
__all__ = [
|
| 5 |
+
"BackboneID",
|
| 6 |
+
"BACKBONE_META",
|
| 7 |
+
"BackboneMLPHeadConfig",
|
| 8 |
+
]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
# ============================================================
|
| 12 |
# Backbone whitelist + meta registry
|
| 13 |
# ============================================================
|
models/google__vit-base-patch16-224/ds_model.py
CHANGED
|
@@ -17,7 +17,10 @@ from transformers.modeling_outputs import ImageClassifierOutput
|
|
| 17 |
# --- torchvision ---
|
| 18 |
from torchvision import models as tv_models
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
| 21 |
# from mlp_head import MLPHead
|
| 22 |
|
| 23 |
class MLPHead(nn.Module):
|
|
|
|
| 17 |
# --- torchvision ---
|
| 18 |
from torchvision import models as tv_models
|
| 19 |
|
| 20 |
+
try:
|
| 21 |
+
from .ds_cfg import BackboneMLPHeadConfig, BACKBONE_META
|
| 22 |
+
except ImportError:
|
| 23 |
+
from ds_cfg import BackboneMLPHeadConfig, BACKBONE_META
|
| 24 |
# from mlp_head import MLPHead
|
| 25 |
|
| 26 |
class MLPHead(nn.Module):
|
models/google__vit-base-patch16-224/ds_proc.py
CHANGED
|
@@ -16,7 +16,12 @@ from transformers import AutoImageProcessor, AutoConfig
|
|
| 16 |
from transformers.image_processing_base import ImageProcessingMixin
|
| 17 |
from transformers.utils.generic import TensorType
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
|
| 22 |
class BackboneMLPHead224ImageProcessor(ImageProcessingMixin):
|
|
|
|
| 16 |
from transformers.image_processing_base import ImageProcessingMixin
|
| 17 |
from transformers.utils.generic import TensorType
|
| 18 |
|
| 19 |
+
try:
|
| 20 |
+
# Hub/Colab: dynamic module ๋ก๋ฉ์์๋ ์๋ import๊ฐ ์ ์
|
| 21 |
+
from .ds_cfg import BackboneID, BACKBONE_META
|
| 22 |
+
except ImportError:
|
| 23 |
+
# ๋ก์ปฌ: python script.py ๋๋ top-level import์์๋ ์ ๋ import๋ก fallback
|
| 24 |
+
from ds_cfg import BackboneID, BACKBONE_META
|
| 25 |
|
| 26 |
|
| 27 |
class BackboneMLPHead224ImageProcessor(ImageProcessingMixin):
|
models/google__vit-base-patch16-224/model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 346372132
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:911b24afbf6ed3a61687a5c67609c5a909dfd6f16d013bb1cad613aba5b3ebe4
|
| 3 |
size 346372132
|
models/microsoft__resnet-50/config.json
CHANGED
|
@@ -24,7 +24,7 @@
|
|
| 24 |
"num_labels": 3,
|
| 25 |
"transformers_version": "5.1.0",
|
| 26 |
"ds_provenance": {
|
| 27 |
-
"created_at": "
|
| 28 |
"repo_id": "dsaint31/bb_mlp_224",
|
| 29 |
"subdir": "models/microsoft__resnet-50",
|
| 30 |
"wrapper_class": "BackboneWithMLPHeadForImageClassification",
|
|
|
|
| 24 |
"num_labels": 3,
|
| 25 |
"transformers_version": "5.1.0",
|
| 26 |
"ds_provenance": {
|
| 27 |
+
"created_at": "20260210_170738",
|
| 28 |
"repo_id": "dsaint31/bb_mlp_224",
|
| 29 |
"subdir": "models/microsoft__resnet-50",
|
| 30 |
"wrapper_class": "BackboneWithMLPHeadForImageClassification",
|
models/microsoft__resnet-50/ds_cfg.py
CHANGED
|
@@ -1,6 +1,13 @@
|
|
| 1 |
from transformers import PretrainedConfig
|
| 2 |
from typing import Literal, Any
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
# ============================================================
|
| 5 |
# Backbone whitelist + meta registry
|
| 6 |
# ============================================================
|
|
|
|
| 1 |
from transformers import PretrainedConfig
|
| 2 |
from typing import Literal, Any
|
| 3 |
|
| 4 |
+
__all__ = [
|
| 5 |
+
"BackboneID",
|
| 6 |
+
"BACKBONE_META",
|
| 7 |
+
"BackboneMLPHeadConfig",
|
| 8 |
+
]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
# ============================================================
|
| 12 |
# Backbone whitelist + meta registry
|
| 13 |
# ============================================================
|
models/microsoft__resnet-50/ds_model.py
CHANGED
|
@@ -17,7 +17,10 @@ from transformers.modeling_outputs import ImageClassifierOutput
|
|
| 17 |
# --- torchvision ---
|
| 18 |
from torchvision import models as tv_models
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
| 21 |
# from mlp_head import MLPHead
|
| 22 |
|
| 23 |
class MLPHead(nn.Module):
|
|
|
|
| 17 |
# --- torchvision ---
|
| 18 |
from torchvision import models as tv_models
|
| 19 |
|
| 20 |
+
try:
|
| 21 |
+
from .ds_cfg import BackboneMLPHeadConfig, BACKBONE_META
|
| 22 |
+
except ImportError:
|
| 23 |
+
from ds_cfg import BackboneMLPHeadConfig, BACKBONE_META
|
| 24 |
# from mlp_head import MLPHead
|
| 25 |
|
| 26 |
class MLPHead(nn.Module):
|
models/microsoft__resnet-50/ds_proc.py
CHANGED
|
@@ -16,7 +16,12 @@ from transformers import AutoImageProcessor, AutoConfig
|
|
| 16 |
from transformers.image_processing_base import ImageProcessingMixin
|
| 17 |
from transformers.utils.generic import TensorType
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
|
| 22 |
class BackboneMLPHead224ImageProcessor(ImageProcessingMixin):
|
|
|
|
| 16 |
from transformers.image_processing_base import ImageProcessingMixin
|
| 17 |
from transformers.utils.generic import TensorType
|
| 18 |
|
| 19 |
+
try:
|
| 20 |
+
# Hub/Colab: dynamic module ๋ก๋ฉ์์๋ ์๋ import๊ฐ ์ ์
|
| 21 |
+
from .ds_cfg import BackboneID, BACKBONE_META
|
| 22 |
+
except ImportError:
|
| 23 |
+
# ๋ก์ปฌ: python script.py ๋๋ top-level import์์๋ ์ ๋ import๋ก fallback
|
| 24 |
+
from ds_cfg import BackboneID, BACKBONE_META
|
| 25 |
|
| 26 |
|
| 27 |
class BackboneMLPHead224ImageProcessor(ImageProcessingMixin):
|
models/microsoft__resnet-50/model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 96388660
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4ff72671dfb9ce0dddaa0b43965385bf4185ce4210d00092b5d08ed116cecc4b
|
| 3 |
size 96388660
|
models/microsoft__swin-tiny-patch4-window7-224/config.json
CHANGED
|
@@ -24,7 +24,7 @@
|
|
| 24 |
"num_labels": 3,
|
| 25 |
"transformers_version": "5.1.0",
|
| 26 |
"ds_provenance": {
|
| 27 |
-
"created_at": "
|
| 28 |
"repo_id": "dsaint31/bb_mlp_224",
|
| 29 |
"subdir": "models/microsoft__swin-tiny-patch4-window7-224",
|
| 30 |
"wrapper_class": "BackboneWithMLPHeadForImageClassification",
|
|
|
|
| 24 |
"num_labels": 3,
|
| 25 |
"transformers_version": "5.1.0",
|
| 26 |
"ds_provenance": {
|
| 27 |
+
"created_at": "20260210_170738",
|
| 28 |
"repo_id": "dsaint31/bb_mlp_224",
|
| 29 |
"subdir": "models/microsoft__swin-tiny-patch4-window7-224",
|
| 30 |
"wrapper_class": "BackboneWithMLPHeadForImageClassification",
|
models/microsoft__swin-tiny-patch4-window7-224/ds_cfg.py
CHANGED
|
@@ -1,6 +1,13 @@
|
|
| 1 |
from transformers import PretrainedConfig
|
| 2 |
from typing import Literal, Any
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
# ============================================================
|
| 5 |
# Backbone whitelist + meta registry
|
| 6 |
# ============================================================
|
|
|
|
| 1 |
from transformers import PretrainedConfig
|
| 2 |
from typing import Literal, Any
|
| 3 |
|
| 4 |
+
__all__ = [
|
| 5 |
+
"BackboneID",
|
| 6 |
+
"BACKBONE_META",
|
| 7 |
+
"BackboneMLPHeadConfig",
|
| 8 |
+
]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
# ============================================================
|
| 12 |
# Backbone whitelist + meta registry
|
| 13 |
# ============================================================
|
models/microsoft__swin-tiny-patch4-window7-224/ds_model.py
CHANGED
|
@@ -17,7 +17,10 @@ from transformers.modeling_outputs import ImageClassifierOutput
|
|
| 17 |
# --- torchvision ---
|
| 18 |
from torchvision import models as tv_models
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
| 21 |
# from mlp_head import MLPHead
|
| 22 |
|
| 23 |
class MLPHead(nn.Module):
|
|
|
|
| 17 |
# --- torchvision ---
|
| 18 |
from torchvision import models as tv_models
|
| 19 |
|
| 20 |
+
try:
|
| 21 |
+
from .ds_cfg import BackboneMLPHeadConfig, BACKBONE_META
|
| 22 |
+
except ImportError:
|
| 23 |
+
from ds_cfg import BackboneMLPHeadConfig, BACKBONE_META
|
| 24 |
# from mlp_head import MLPHead
|
| 25 |
|
| 26 |
class MLPHead(nn.Module):
|
models/microsoft__swin-tiny-patch4-window7-224/ds_proc.py
CHANGED
|
@@ -16,7 +16,12 @@ from transformers import AutoImageProcessor, AutoConfig
|
|
| 16 |
from transformers.image_processing_base import ImageProcessingMixin
|
| 17 |
from transformers.utils.generic import TensorType
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
|
| 22 |
class BackboneMLPHead224ImageProcessor(ImageProcessingMixin):
|
|
|
|
| 16 |
from transformers.image_processing_base import ImageProcessingMixin
|
| 17 |
from transformers.utils.generic import TensorType
|
| 18 |
|
| 19 |
+
try:
|
| 20 |
+
# Hub/Colab: dynamic module ๋ก๋ฉ์์๋ ์๋ import๊ฐ ์ ์
|
| 21 |
+
from .ds_cfg import BackboneID, BACKBONE_META
|
| 22 |
+
except ImportError:
|
| 23 |
+
# ๋ก์ปฌ: python script.py ๋๋ top-level import์์๋ ์ ๋ import๋ก fallback
|
| 24 |
+
from ds_cfg import BackboneID, BACKBONE_META
|
| 25 |
|
| 26 |
|
| 27 |
class BackboneMLPHead224ImageProcessor(ImageProcessingMixin):
|
models/microsoft__swin-tiny-patch4-window7-224/model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 111128348
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:002362a9ce13fb5833945df3227b93f727613a2630c259525ac9eb3f1e5ecf69
|
| 3 |
size 111128348
|
models/timm__densenet121.tv_in1k/config.json
CHANGED
|
@@ -24,7 +24,7 @@
|
|
| 24 |
"num_labels": 3,
|
| 25 |
"transformers_version": "5.1.0",
|
| 26 |
"ds_provenance": {
|
| 27 |
-
"created_at": "
|
| 28 |
"repo_id": "dsaint31/bb_mlp_224",
|
| 29 |
"subdir": "models/timm__densenet121.tv_in1k",
|
| 30 |
"wrapper_class": "BackboneWithMLPHeadForImageClassification",
|
|
|
|
| 24 |
"num_labels": 3,
|
| 25 |
"transformers_version": "5.1.0",
|
| 26 |
"ds_provenance": {
|
| 27 |
+
"created_at": "20260210_170738",
|
| 28 |
"repo_id": "dsaint31/bb_mlp_224",
|
| 29 |
"subdir": "models/timm__densenet121.tv_in1k",
|
| 30 |
"wrapper_class": "BackboneWithMLPHeadForImageClassification",
|
models/timm__densenet121.tv_in1k/ds_cfg.py
CHANGED
|
@@ -1,6 +1,13 @@
|
|
| 1 |
from transformers import PretrainedConfig
|
| 2 |
from typing import Literal, Any
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
# ============================================================
|
| 5 |
# Backbone whitelist + meta registry
|
| 6 |
# ============================================================
|
|
|
|
| 1 |
from transformers import PretrainedConfig
|
| 2 |
from typing import Literal, Any
|
| 3 |
|
| 4 |
+
__all__ = [
|
| 5 |
+
"BackboneID",
|
| 6 |
+
"BACKBONE_META",
|
| 7 |
+
"BackboneMLPHeadConfig",
|
| 8 |
+
]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
# ============================================================
|
| 12 |
# Backbone whitelist + meta registry
|
| 13 |
# ============================================================
|
models/timm__densenet121.tv_in1k/ds_model.py
CHANGED
|
@@ -17,7 +17,10 @@ from transformers.modeling_outputs import ImageClassifierOutput
|
|
| 17 |
# --- torchvision ---
|
| 18 |
from torchvision import models as tv_models
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
| 21 |
# from mlp_head import MLPHead
|
| 22 |
|
| 23 |
class MLPHead(nn.Module):
|
|
|
|
| 17 |
# --- torchvision ---
|
| 18 |
from torchvision import models as tv_models
|
| 19 |
|
| 20 |
+
try:
|
| 21 |
+
from .ds_cfg import BackboneMLPHeadConfig, BACKBONE_META
|
| 22 |
+
except ImportError:
|
| 23 |
+
from ds_cfg import BackboneMLPHeadConfig, BACKBONE_META
|
| 24 |
# from mlp_head import MLPHead
|
| 25 |
|
| 26 |
class MLPHead(nn.Module):
|
models/timm__densenet121.tv_in1k/ds_proc.py
CHANGED
|
@@ -16,7 +16,12 @@ from transformers import AutoImageProcessor, AutoConfig
|
|
| 16 |
from transformers.image_processing_base import ImageProcessingMixin
|
| 17 |
from transformers.utils.generic import TensorType
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
|
| 22 |
class BackboneMLPHead224ImageProcessor(ImageProcessingMixin):
|
|
|
|
| 16 |
from transformers.image_processing_base import ImageProcessingMixin
|
| 17 |
from transformers.utils.generic import TensorType
|
| 18 |
|
| 19 |
+
try:
|
| 20 |
+
# Hub/Colab: dynamic module ๋ก๋ฉ์์๋ ์๋ import๊ฐ ์ ์
|
| 21 |
+
from .ds_cfg import BackboneID, BACKBONE_META
|
| 22 |
+
except ImportError:
|
| 23 |
+
# ๋ก์ปฌ: python script.py ๋๋ top-level import์์๋ ์ ๋ import๋ก fallback
|
| 24 |
+
from ds_cfg import BackboneID, BACKBONE_META
|
| 25 |
|
| 26 |
|
| 27 |
class BackboneMLPHead224ImageProcessor(ImageProcessingMixin):
|
models/timm__densenet121.tv_in1k/model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 29293620
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:41040153bbc2066a084f36774b3ce20a45d9adf38ade5d33ae544c53d69350e6
|
| 3 |
size 29293620
|
models/torchvision__densenet121/config.json
CHANGED
|
@@ -24,7 +24,7 @@
|
|
| 24 |
"num_labels": 3,
|
| 25 |
"transformers_version": "5.1.0",
|
| 26 |
"ds_provenance": {
|
| 27 |
-
"created_at": "
|
| 28 |
"repo_id": "dsaint31/bb_mlp_224",
|
| 29 |
"subdir": "models/torchvision__densenet121",
|
| 30 |
"wrapper_class": "BackboneWithMLPHeadForImageClassification",
|
|
|
|
| 24 |
"num_labels": 3,
|
| 25 |
"transformers_version": "5.1.0",
|
| 26 |
"ds_provenance": {
|
| 27 |
+
"created_at": "20260210_170738",
|
| 28 |
"repo_id": "dsaint31/bb_mlp_224",
|
| 29 |
"subdir": "models/torchvision__densenet121",
|
| 30 |
"wrapper_class": "BackboneWithMLPHeadForImageClassification",
|
models/torchvision__densenet121/ds_cfg.py
CHANGED
|
@@ -1,6 +1,13 @@
|
|
| 1 |
from transformers import PretrainedConfig
|
| 2 |
from typing import Literal, Any
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
# ============================================================
|
| 5 |
# Backbone whitelist + meta registry
|
| 6 |
# ============================================================
|
|
|
|
| 1 |
from transformers import PretrainedConfig
|
| 2 |
from typing import Literal, Any
|
| 3 |
|
| 4 |
+
__all__ = [
|
| 5 |
+
"BackboneID",
|
| 6 |
+
"BACKBONE_META",
|
| 7 |
+
"BackboneMLPHeadConfig",
|
| 8 |
+
]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
# ============================================================
|
| 12 |
# Backbone whitelist + meta registry
|
| 13 |
# ============================================================
|
models/torchvision__densenet121/ds_model.py
CHANGED
|
@@ -17,7 +17,10 @@ from transformers.modeling_outputs import ImageClassifierOutput
|
|
| 17 |
# --- torchvision ---
|
| 18 |
from torchvision import models as tv_models
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
| 21 |
# from mlp_head import MLPHead
|
| 22 |
|
| 23 |
class MLPHead(nn.Module):
|
|
|
|
| 17 |
# --- torchvision ---
|
| 18 |
from torchvision import models as tv_models
|
| 19 |
|
| 20 |
+
try:
|
| 21 |
+
from .ds_cfg import BackboneMLPHeadConfig, BACKBONE_META
|
| 22 |
+
except ImportError:
|
| 23 |
+
from ds_cfg import BackboneMLPHeadConfig, BACKBONE_META
|
| 24 |
# from mlp_head import MLPHead
|
| 25 |
|
| 26 |
class MLPHead(nn.Module):
|
models/torchvision__densenet121/ds_proc.py
CHANGED
|
@@ -16,7 +16,12 @@ from transformers import AutoImageProcessor, AutoConfig
|
|
| 16 |
from transformers.image_processing_base import ImageProcessingMixin
|
| 17 |
from transformers.utils.generic import TensorType
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
|
| 22 |
class BackboneMLPHead224ImageProcessor(ImageProcessingMixin):
|
|
|
|
| 16 |
from transformers.image_processing_base import ImageProcessingMixin
|
| 17 |
from transformers.utils.generic import TensorType
|
| 18 |
|
| 19 |
+
try:
|
| 20 |
+
# Hub/Colab: dynamic module ๋ก๋ฉ์์๋ ์๋ import๊ฐ ์ ์
|
| 21 |
+
from .ds_cfg import BackboneID, BACKBONE_META
|
| 22 |
+
except ImportError:
|
| 23 |
+
# ๋ก์ปฌ: python script.py ๋๋ top-level import์์๋ ์ ๋ import๋ก fallback
|
| 24 |
+
from ds_cfg import BackboneID, BACKBONE_META
|
| 25 |
|
| 26 |
|
| 27 |
class BackboneMLPHead224ImageProcessor(ImageProcessingMixin):
|
models/torchvision__densenet121/model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 33394052
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:717710e4f328713f7cfb85f1d12c5c1b24ff290c7afea055ff32dd5ad0d0bcc3
|
| 3 |
size 33394052
|