The document presents a novel method for federated learning that enables the ensembling of neural network models with heterogeneous structures. It evaluates six optimization algorithms for tuning model weights, finding the Tree-structured Parzen Estimator (TPE) achieved the highest accuracy. The study also emphasizes the benefits of federated learning in enhancing data privacy and reducing response time, while addressing the challenges posed by model heterogeneity and resource limitations.