fkodom/transformer-from-scratch

Simplify the encoder code

ShengYun-Peng opened this issue · 0 comments

Thanks for the clean implementation! I guess replacing the ModuleList with Sequential has the same effect, but you can remove the for loop in the following forward function.

self.layers = nn.ModuleList(