Vincent Bouttier
Vincent Bouttier
The code from the master branch ("embedded = self.pe(embedded)") seems right, the PositionalEncoding layer (self.pe) does the job of summing without the need for an extra summation. @AnshMittal1811: Why did...
It indeed solves the mismatch problem
I agree with @chrislybaer, it is fine the way it is: there is no need for a "+=" See https://pytorch.org/tutorials/beginner/transformer_tutorial.html#define-the-model
The length of the vocab.pkl file from @ronak-44 does not match the dimensions of the network (50 vs 45, see https://github.com/DSPsleeporg/smiles-transformer/issues/17#issuecomment-932688504). https://github.com/DSPsleeporg/smiles-transformer/issues/17#issuecomment-947417504 explains in detail how to generate vocab.pkl with...