In confirmatory clinical trials, it has been proposed [Bretz et al., 2009] to use a simple iterative graphical approach to construct and perform intersection hypotheses tests using weighted Bonferroni-type procedures to control type I error in the strong sense. Given Phase II study results or prior knowledge, it is usually of main interest to find the optimal graph that maximizes a certain objective function in a future Phase III study. However, lack of closed form expression in the objective function makes the optimization challenging. In this manuscript, we propose a general optimization framework to obtain the global maximum via Feedforward neural networks (FNNs) in deep learning. Simulation studies show that our FNN-based approach has a better balance between robustness and time efficiency than some existing derivative-free constrained optimization algorithms. Compared to the traditional window searching approach, our optimizer has moderate multiplicity adjusted power gain when the number of hypotheses is relatively large or when their correlations are high. We further apply it to a case study to illustrate how to optimize a multiple test procedure with respect to a specific study objective.