Ear recognition is gaining on popularity in recent years. The human ear are neither affected by expressions like faces are nor do need closer touching like finger-prints do. In this paper, a novel algorithm was proposed to do ear recognition using deep convolutional neural network and provide a visualization of the learned network. We design a convolutional neural network with three convolutional layers, a fully-connected layer and a soft-max classifier. The experimental results on USTB ear database indict that our proposed method is easier botain high accuracy and outperforms the traditional method in dealing with partial occlusion.