Optimizing the optimizer for data driven deep neural networks and physics informed neural networks | Synapse