In order to ensure stability and faster convergence, the training of SkeGAN is done in two stages viz. the pre-training and the adversarial training. \(G\)  is pre-trained so that it can avoid generating meaningless values for both offsets and pen-states. At each time-step \(i\) , \(S_{i-1}\)  is fed to \(G\) . The pre-training of \(G\)  is done for 38500 iterations and the loss function used is the reconstruction loss \(L_R\)  [1]} as given in Equation . \(D\)  is also pre-trained so that it can effectively differentiate between the real and the fake samples to provide better feedback to \(G\) . In our case, \(D\)  is pre-trained for 35000 iterations. Each batch for pre-training \(D\)  contains 50% samples from the dataset (labeled as real data) and 50% samples generated by \(G\)  (labeled as fake data). The loss function used is the binary cross entropy loss. The number of iterations to pre-train was decided using empirical studies.
