Update modelling_single.py
Browse files- modelling_single.py +1 -0
modelling_single.py
CHANGED
|
@@ -233,6 +233,7 @@ class SingleCXREncoderDecoderModel(VisionEncoderDecoderModel):
|
|
| 233 |
|
| 234 |
if not past_key_values:
|
| 235 |
token_type_ids = self.token_ids_to_token_type_ids(input_ids, special_token_ids)
|
|
|
|
| 236 |
else:
|
| 237 |
token_type_ids = self.token_ids_to_token_type_ids_past(input_ids, special_token_ids)
|
| 238 |
|
|
|
|
| 233 |
|
| 234 |
if not past_key_values:
|
| 235 |
token_type_ids = self.token_ids_to_token_type_ids(input_ids, special_token_ids)
|
| 236 |
+
decoder_inputs['past_key_values']=None # Because at the first step, there was no past_key_values
|
| 237 |
else:
|
| 238 |
token_type_ids = self.token_ids_to_token_type_ids_past(input_ids, special_token_ids)
|
| 239 |
|