Commit
·
b716c3f
1
Parent(s):
0de77cb
Create configuration_efficientnetv25.py
Browse files
configuration_efficientnetv25.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import PretrainedConfig
|
| 2 |
+
|
| 3 |
+
class EfficientNetV25Config(PretrainedConfig):
|
| 4 |
+
model_type = "efficientnetv25"
|
| 5 |
+
|
| 6 |
+
def __init__(self,
|
| 7 |
+
url="https://huggingface.co/FredZhang7/efficientnetv2.5_rw_s/resolve/main/efficientnetv2.5_base_in1k.pth",
|
| 8 |
+
input_size=[3, 304, 304],
|
| 9 |
+
num_classes=1000,
|
| 10 |
+
interpolation="bicubic",
|
| 11 |
+
mean=[0.5, 0.5, 0.5],
|
| 12 |
+
std=[0.5, 0.5, 0.5],
|
| 13 |
+
**kwargs):
|
| 14 |
+
self.url = url
|
| 15 |
+
self.input_size = input_size
|
| 16 |
+
self.num_classes = num_classes
|
| 17 |
+
self.interpolation = interpolation
|
| 18 |
+
self.mean = mean
|
| 19 |
+
self.std = std
|
| 20 |
+
super().__init__(**kwargs)
|