Supply to a transformer different input to the encoder and the decoder

Is possible to supply to a transformer different input to the encoder and the decoder?