Upload ModelConfiguration.py with huggingface_hub
Browse files- ModelConfiguration.py +13 -0
ModelConfiguration.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
from transformers import PretrainedConfig
|
| 3 |
+
class VesselSegmentConfig(PretrainedConfig):
|
| 4 |
+
model_type = "SegformerForSemanticSegmentation"
|
| 5 |
+
def __init__(self, num_classes=1, input_channels=1, image_size=[512,512], features=[64,64,128], attention_dims=[64,32,16], patch_size=256, batch_size=4, **kwargs):
|
| 6 |
+
self.num_classes = num_classes
|
| 7 |
+
self.input_channels = input_channels
|
| 8 |
+
self.image_size = image_size
|
| 9 |
+
self.features = features
|
| 10 |
+
self.attention_dims = attention_dims
|
| 11 |
+
self.patch_size = patch_size
|
| 12 |
+
self.batch_size = batch_size
|
| 13 |
+
super().__init__(**kwargs)
|