Indonesia has a maritime boundary that vulnerable to illegal activities. Those activities leadto the bad loss of Indonesia income. Therefore, monitoring of every object which is passing throughthe maritime boundary is important. Detection of ship that is passing through the ocean is one of many ways to monitor the maritime boundary. Nowadays, there are many systems developed to detect andto recognize ship automatically especially fishing ship and military ship. The recognition adopts technology which is called CNN. CNN is deep learning algorithm that is based on image. CNN has many parameters that can be optimized the recognition system. This study investigated some parameters such as pooling layer, batch normalization and dropout parameters. For the best accuracy results on the fishing ship and military ship dataset obtained a value of 99.99% for training and 90% for validation accuracy. The best accuracy results are obtained by using the pooling layer with the max pooling type. Max pooling is more efficient used for object recognition than average pooling. The use of dropout functions can increase the level of training accuracy. Batch normalization can increase the validation accuracy value.