[EncoderDecoderConfig] automatically set decoder config to decoder (#4809)
* automatically set decoder config to decoder * add more tests
This commit is contained in:
committed by
GitHub
parent
f1fe18465d
commit
8cca875569
@@ -85,6 +85,9 @@ class EncoderDecoderConfig(PretrainedConfig):
|
||||
Returns:
|
||||
:class:`EncoderDecoderConfig`: An instance of a configuration object
|
||||
"""
|
||||
logger.info("Set `config.is_decoder=True` for decoder_config")
|
||||
decoder_config.is_decoder = True
|
||||
|
||||
return cls(encoder=encoder_config.to_dict(), decoder=decoder_config.to_dict())
|
||||
|
||||
def to_dict(self):
|
||||
|
||||
Reference in New Issue
Block a user