@david.waterworth What did you set for your self.transformer? I assume nn.Transformer(). Great let me know about the Positional Encoding! I too have been banging my head about this.
Also, check out this very informative thread 19.