Topology optimization is a method to find the optimal material distribution of a structure by minimizing the objective function under the design and limit constraints. In this paper, we developed a deep learning-based machine learning algorithm to get the optimized structure for the given input conditions of a structure. We trained convolutional neural network (CNN)-based encoder–decoder architecture using the existing dataset as target images and input conditions modeled as input images. The target images are the optimized structures, developed using the MATLAB open-source topology optimization code, generated by varying the volume fraction from 5 to 95% with an increment of 5% and Poisson’s ratio varied from 0.01 to 0.49. The input conditions, i.e., the volume fraction and Poisson’s ratio are modeled as input images. In the present study, four types of input images and two encoder–decoder architectures are developed, and their performance is studied using identity mapping to obtain the optimized structure of a cantilever beam which is fixed at one end and a constant load is applied at the other end. © Springer Nature Singapore Pte Ltd 2020.