The teacher's forcing method was used. In this method the likelihood calculation on step 𝑖 is calculated from the previous tokens in the training SMILES and not from the possibly wrong token of the untrained RNN. This allows the RNN to learn the information in the training set faster and more reliably.