Transformers, Pytorch, Machine Learning, Deep Dives, Data Science.
x: (B, Sx) with elements in (0, C) where C is num_classes y: (B, Sy) with elements in (0, C) where C is num_classes Output (B, L, C) logits """ # Encoder output shape (B, S, E) encoder_output, encoder_padding_mask = self.encode(x) # Decoder output shape (B, L, C) decoder_output = self.decode(