Thanks for your reply! I’m following this tutorial but I always get an output size of [batch_size, seq_len, output_dim] where output_dim is the output of my fully connected layer at the end of the transformer encoder. What is the best approach to make the predictions in the shape [batch_size, output_dim]?