Update configuration_upscaler.py
Browse files- configuration_upscaler.py +21 -24
configuration_upscaler.py
CHANGED
|
@@ -1,24 +1,21 @@
|
|
| 1 |
-
from transformers import PretrainedConfig
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
self.
|
| 19 |
-
self.
|
| 20 |
-
self.
|
| 21 |
-
self.
|
| 22 |
-
self.feat1 = int(feat1)
|
| 23 |
-
self.feat2 = int(feat2)
|
| 24 |
-
self.use_refine = bool(use_refine)
|
|
|
|
| 1 |
+
from transformers import PretrainedConfig
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
class UpscalerConfig(PretrainedConfig):
|
| 5 |
+
model_type = "upscaler"
|
| 6 |
+
|
| 7 |
+
def __init__(
|
| 8 |
+
self,
|
| 9 |
+
scale: int = 4,
|
| 10 |
+
in_channels: int = 3,
|
| 11 |
+
width: int = 32,
|
| 12 |
+
num_blocks: int = 3,
|
| 13 |
+
espcn_channels: int = 64,
|
| 14 |
+
**kwargs,
|
| 15 |
+
):
|
| 16 |
+
super().__init__(**kwargs)
|
| 17 |
+
self.scale = int(scale)
|
| 18 |
+
self.in_channels = int(in_channels)
|
| 19 |
+
self.width = int(width)
|
| 20 |
+
self.num_blocks = int(num_blocks)
|
| 21 |
+
self.espcn_channels = int(espcn_channels)
|
|
|
|
|
|
|
|
|