The synthesis of spatial mechanisms for defect-free path generation has not received a lot of attention. In this paper, we focus on the synthesis of 5-SS mechanisms and use a machine learning based approach. First, we create a coupler path database using a solver based on the iterative Newton-Raphson optimization algorithm. Subsequently, a data cleanup, normalization, balancing, and augmentation pipeline is established based on intrinsic properties of space curves namely curvature and torsion. Finally, we use an unsupervised learning algorithm based on Variational Autoencoder combined with K-means clustering to find a multiplicity of defect-free 5-SS mechanisms and examples are presented.