Legged robots are popular candidates for missions in challenging terrains due to their versatile locomotion strategies. Terrain classification is a key enabling technology for autonomous legged robots, allowing them to harness their innate flexibility to adapt to the demands of their operating environment. We show how highly capable machine learning techniques, namely gated recurrent neural networks, allow our target legged robot to correctly classify the terrain it traverses in both supervised and semi-supervised fashions. Tests on a benchmark dataset shows that our time-domain classifiers are well capable of handling raw and variable-length data with small amount of labels and outperform frequency-domain classifiers. The classification results on our own extended dataset opens up a range of high-performance behaviours that are specific to those environments. Furthermore, we show how raw unlabelled data is used to improve significantly the classification results in a semi-supervised model.