Inverse problems for Partial Differential Equations (PDEs) are crucial in numerous applications such as geophysics, biomedical imaging, and material science, where unknown physical properties must be inferred from indirect measurements. In this work, we present a new approach to solving the inverse problem for elliptic PDEs, using only boundary data. Our method leverages the Dirichlet-to-Neumann (DtN) map, which captures the relationship between boundary inputs and flux responses. This enables the reconstruction of the unknown physical properties within the domain from boundary measurements alone. Our framework employs a self-supervised machine learning algorithm that integrates a Finite Element Method (FEM) in the inner loop for the forward problem, ensuring high accuracy. Moreover, our approach illustrates its effectiveness in challenging scenarios with only partial boundary observations, which is often the case in real-world scenarios. In addition, the proposed algorithm effectively handles discontinuities by incorporating carefully designed loss functions. This combined FEM and machine learning approach offers a robust, accurate solution strategy for a broad range of inverse problems, enabling improved estimation of critical parameters in applications from medical diagnostics to subsurface exploration.