Stereo matching is an important research topic in the field of computer vision. It recovers depth information from a pair of color images. Unfortunately, converting multi-dimensional (more than two-dimensional) data into two-dimensional data, such formulations ignore the spatial structure of multi-dimensional images/data. Tensors can be used to describe high-dimensional data structure, which can retain the hidden structure of data, but cannot obtain the deep features that helps to improve the performance of the algorithm. Therefore, it is very important to establish a deep tensor model. In this paper, we propose a two layer tensor form convolutional sparse coding model, which can automatically learn the deep convolutional kernel. Based on the learned two layer convolutional kernels, a two-layer dictionary learning model is established. Then, a new weighted matching cost method is constructed, which combines shallow and deep features. The experimental results on the Middlebury benchmark v2 and Middlebury benchmark v3 show that the proposed two layer tensor convolutional sparse coding is effective for stereo matching.