hidehisa-arai
commited on
Commit
•
e1a2c6a
1
Parent(s):
74440d3
update
Browse files
configuration_japanese_clip.py
CHANGED
@@ -24,8 +24,6 @@ class JapaneseCLIPVisionConfig(PretrainedConfig):
|
|
24 |
output_tokens: bool = False,
|
25 |
**kwargs
|
26 |
):
|
27 |
-
super().__init__(**kwargs)
|
28 |
-
|
29 |
self.image_size = image_size
|
30 |
self.patch_size = patch_size
|
31 |
self.width = width
|
@@ -43,6 +41,7 @@ class JapaneseCLIPVisionConfig(PretrainedConfig):
|
|
43 |
self.pool_type = pool_type
|
44 |
self.final_ln_after_pool = final_ln_after_pool
|
45 |
self.output_tokens = output_tokens
|
|
|
46 |
|
47 |
|
48 |
class JapaneseCLIPConfig(PretrainedConfig):
|
@@ -53,12 +52,8 @@ class JapaneseCLIPConfig(PretrainedConfig):
|
|
53 |
max_length: int = 77,
|
54 |
**kwargs
|
55 |
):
|
56 |
-
super().__init__(**kwargs)
|
57 |
-
|
58 |
self.max_length = max_length
|
59 |
-
import pdb
|
60 |
|
61 |
-
pdb.set_trace()
|
62 |
if "vision_config" not in kwargs:
|
63 |
raise ValueError("vision_config must be provided")
|
64 |
if "text_config" not in kwargs:
|
@@ -69,6 +64,7 @@ class JapaneseCLIPConfig(PretrainedConfig):
|
|
69 |
|
70 |
self.vision_config = JapaneseCLIPVisionConfig(**vision_config)
|
71 |
self.text_config = RobertaConfig(**text_config)
|
|
|
72 |
|
73 |
@classmethod
|
74 |
def from_vision_text_configs(
|
|
|
24 |
output_tokens: bool = False,
|
25 |
**kwargs
|
26 |
):
|
|
|
|
|
27 |
self.image_size = image_size
|
28 |
self.patch_size = patch_size
|
29 |
self.width = width
|
|
|
41 |
self.pool_type = pool_type
|
42 |
self.final_ln_after_pool = final_ln_after_pool
|
43 |
self.output_tokens = output_tokens
|
44 |
+
super().__init__(**kwargs)
|
45 |
|
46 |
|
47 |
class JapaneseCLIPConfig(PretrainedConfig):
|
|
|
52 |
max_length: int = 77,
|
53 |
**kwargs
|
54 |
):
|
|
|
|
|
55 |
self.max_length = max_length
|
|
|
56 |
|
|
|
57 |
if "vision_config" not in kwargs:
|
58 |
raise ValueError("vision_config must be provided")
|
59 |
if "text_config" not in kwargs:
|
|
|
64 |
|
65 |
self.vision_config = JapaneseCLIPVisionConfig(**vision_config)
|
66 |
self.text_config = RobertaConfig(**text_config)
|
67 |
+
super().__init__(**kwargs)
|
68 |
|
69 |
@classmethod
|
70 |
def from_vision_text_configs(
|