Train and optimize the autoencoder
As stated in section
Optimizing and training the autoencoder, we trained three autoencoders that operate of different dimensionalities using the
PyTorch framework and the
GPyOpt library. To keep the different models as uniform as possible, all autoencoders consist of three layers of interchanged Linear and LeakyReLu modules that gradually reduce the dimensionality. As an optimization algorithm we use Adam in combination with the MSE (Mean Squared Error) loss function to minimise the distance between original and reconstructed features.
In addition to the MSE, we introduce the custom regulating factor MND (Mean Normalized Distance). MND aims at reducing the distance between successive samples in time in the embedding and should therefore smooth the trajectories of potential gestures in the two-dimensional latent space. Since the MND is only a regulating factor, we apply the weighting coefficient of 0.1 to its value before calculating the final loss L for the optimization algorithm as
\[L\ =\ MSE\ +\ \alpha MND\]