hidehisa-arai commited on
Commit
6f5ff9a
1 Parent(s): 3f52ae6

update configuration_clip

Browse files
Files changed (1) hide show
  1. configuration_japanese_clip.py +6 -0
configuration_japanese_clip.py CHANGED
@@ -46,6 +46,7 @@ class JapaneseCLIPVisionConfig(PretrainedConfig):
46
 
47
  class JapaneseCLIPConfig(PretrainedConfig):
48
  model_type = "japanese_clip"
 
49
 
50
  def __init__(
51
  self,
@@ -54,6 +55,11 @@ class JapaneseCLIPConfig(PretrainedConfig):
54
  ):
55
  self.max_length = max_length
56
 
 
 
 
 
 
57
  vision_config = kwargs["vision_config"]
58
  text_config = kwargs["text_config"]
59
 
 
46
 
47
  class JapaneseCLIPConfig(PretrainedConfig):
48
  model_type = "japanese_clip"
49
+ is_composition = True
50
 
51
  def __init__(
52
  self,
 
55
  ):
56
  self.max_length = max_length
57
 
58
+ if "vision_config" not in kwargs:
59
+ raise ValueError("vision_config must be provided")
60
+ if "text_config" not in kwargs:
61
+ raise ValueError("text_config must be provided")
62
+
63
  vision_config = kwargs["vision_config"]
64
  text_config = kwargs["text_config"]
65