Leaf disease in tomatoes is one of the most common and treacherous diseases. It directly affects the production of tomatoes, resulting in enormous economic loss each year. As a result, studying the detection of tomato leaf diseases is essential. To that aim, this work introduces a novel mechanism for selecting the most effective hyperparameters for improving the detection accuracy of deep CNN. Several cutting-edge CNN algorithms were examined in this study to diagnose tomato leaf diseases. The experiment is divided into three stages to find a full proof technique. A few pre-trained deep convolutional neural networks were first employed to diagnose tomato leaf diseases. The superlative combined model has then experimented with changes in the learning rate, optimizer, and classifier to discover the optimal parameters and minimize overfitting in data training. In this case, 99.31% accuracy was reached in DenseNet 121 using AdaBound Optimizer, 0.01 learning rate, and Softmax classifier. The achieved detection accuracy levels (above 99%) using various learning rates, optimizers, and classifiers were eventually tested using K-fold cross-validation to get a better and dependable detection accuracy. The results indicate that the proposed parameters and technique are efficacious in recognizing tomato leaf disease and can be used fruitfully in identifying other leaf diseases.