Optimization and Adaptive Kernel Design for Convolutional Neural Network