BART with custom encoder and decoder

By simply calling model.decoder = gpt_model I would add the decoder to the model but not exchanging it, is that correct?