Convolutional Neural Networks (CNN) for medical image classification involves particular features: big images, expensive training, complex architecture with several layers and hyperparameters, etc. Thus, increasing the accuracy or adjusting medical CNN is a challenging task that requires many resources, much time, and specialized knowledge. In this work, we proposed and tested an efficient approach to increase accuracy of a biomedical CNN using optimization algorithms. Our approach starts with a known deep network architecture and tunes it, together with its hyperparameters, to generate a final adjusted one. We have reached improvements in the quality of the results of about 40% when starting from a simple architecture and 12% from a manually adjusted architecture, with only 40 tries in a biomedical image classification case.