Commit
·
711b47e
1
Parent(s):
6f5ff9a
update configuration
Browse files
configuration_japanese_clip.py
CHANGED
@@ -53,6 +53,7 @@ class JapaneseCLIPConfig(PretrainedConfig):
|
|
53 |
max_length: int = 77,
|
54 |
**kwargs
|
55 |
):
|
|
|
56 |
self.max_length = max_length
|
57 |
|
58 |
if "vision_config" not in kwargs:
|
@@ -60,12 +61,11 @@ class JapaneseCLIPConfig(PretrainedConfig):
|
|
60 |
if "text_config" not in kwargs:
|
61 |
raise ValueError("text_config must be provided")
|
62 |
|
63 |
-
vision_config = kwargs
|
64 |
-
text_config = kwargs
|
65 |
|
66 |
self.vision_config = JapaneseCLIPVisionConfig(**vision_config)
|
67 |
self.text_config = RobertaConfig(**text_config)
|
68 |
-
super().__init__(**kwargs)
|
69 |
|
70 |
@classmethod
|
71 |
def from_vision_text_configs(
|
|
|
53 |
max_length: int = 77,
|
54 |
**kwargs
|
55 |
):
|
56 |
+
super().__init__(**kwargs)
|
57 |
self.max_length = max_length
|
58 |
|
59 |
if "vision_config" not in kwargs:
|
|
|
61 |
if "text_config" not in kwargs:
|
62 |
raise ValueError("text_config must be provided")
|
63 |
|
64 |
+
vision_config = kwargs.pop("vision_config")
|
65 |
+
text_config = kwargs.pop("text_config")
|
66 |
|
67 |
self.vision_config = JapaneseCLIPVisionConfig(**vision_config)
|
68 |
self.text_config = RobertaConfig(**text_config)
|
|
|
69 |
|
70 |
@classmethod
|
71 |
def from_vision_text_configs(
|