Inference using the encoder–decoder model