The generalized additive model (GAM) is a flexible statistical tool adept at unraveling complex relationships in datasets. Deep neural networks (DNNs) stand out as robust and versatile models that perform exceptionally well across various computational challenges. In this study, we introduce DeepGAM, an innovative model that leverages the feature-learning capabilities of DNNs while maintaining the interpretability inherent to GAM. This hybrid model is designed to learn a linear combination of neural networks, with each network focusing on a single predictor variable and incorporating a self-attention mechanism to highlight critical features. By training the networks in unison, DeepGAM proficiently maps the nuanced connections between predictors and outcomes. By conducting a comprehensive numerical analysis that encompasses regression and classification tasks, the efficiency and versatility of DeepGAM in addressing diverse analytical problems are validated.