Because the properties of thermoelectric (TE) materials are strongly dependent on temperature and differ considerably, segmented TE legs composed of multiple stacked TE materials have been investigated to provide efficient operation of TE devices. However, owing to the inherent nonlinearity that limits the application of conventional optimization approaches, the optimal configuration of segmented TEGs (STEGs) must have been sought heuristically. In this study, we propose a systematic approach that enables the efficient exploration and exploitation of the vast design space of STEGs by leveraging the fast inference of deep learning. First, we train a neural network (NN) model using a dataset generated from finite element analysis (FEA) for a single TE leg with four stacked segments from among 18 TE materials with varying segment lengths and external loads. We then use a genetic optimization algorithm (GOA) with our trained NN model to search for high-performance design candidates. The performance of the new candidates is computed and validated based on FEA, and the results are used to update the NN through an active learning technique. After iteratively performing the procedure, we can fine-tune the TE legs for optimal efficiency, optimal power, and given combinations of both power and efficiency. Furthermore, we discuss the physical origin of optimally performing STEGs. (C) 2022 The Author(s). Published by Elsevier Ltd.