Upload model
Browse files- config.json +1 -0
- modelling_cxrmate_ed.py +4 -0
config.json
CHANGED
@@ -234,6 +234,7 @@
|
|
234 |
"typical_p": 1.0,
|
235 |
"use_bfloat16": false
|
236 |
},
|
|
|
237 |
"model_type": "vision-encoder-decoder",
|
238 |
"tie_word_embeddings": false,
|
239 |
"torch_dtype": "float32",
|
|
|
234 |
"typical_p": 1.0,
|
235 |
"use_bfloat16": false
|
236 |
},
|
237 |
+
"is_encoder_decoder": true,
|
238 |
"model_type": "vision-encoder-decoder",
|
239 |
"tie_word_embeddings": false,
|
240 |
"torch_dtype": "float32",
|
modelling_cxrmate_ed.py
CHANGED
@@ -76,6 +76,7 @@ class MIMICIVEDCXRMultimodalModel(VisionEncoderDecoderModel):
|
|
76 |
raise ValueError(f"Config: {config} has to be of type {self.config_class}")
|
77 |
|
78 |
config.tie_word_embeddings = False
|
|
|
79 |
|
80 |
# Initialize with config:
|
81 |
PreTrainedModel.__init__(self, config)
|
@@ -284,6 +285,9 @@ class MIMICIVEDCXRMultimodalModel(VisionEncoderDecoderModel):
|
|
284 |
|
285 |
# make sure input & output embeddings is not tied
|
286 |
config.tie_word_embeddings = False
|
|
|
|
|
|
|
287 |
return cls(encoder=encoder, decoder=decoder, config=config)
|
288 |
|
289 |
def forward(
|
|
|
76 |
raise ValueError(f"Config: {config} has to be of type {self.config_class}")
|
77 |
|
78 |
config.tie_word_embeddings = False
|
79 |
+
config.is_encoder_decoder = False
|
80 |
|
81 |
# Initialize with config:
|
82 |
PreTrainedModel.__init__(self, config)
|
|
|
285 |
|
286 |
# make sure input & output embeddings is not tied
|
287 |
config.tie_word_embeddings = False
|
288 |
+
|
289 |
+
config.is_encoder_decoder = False
|
290 |
+
|
291 |
return cls(encoder=encoder, decoder=decoder, config=config)
|
292 |
|
293 |
def forward(
|