Tensor renormalization group (TRG) constitutes an important methodology for accurate simulations of strongly correlated lattice models. Facilitated by the automatic differentiation technique widely used in deep learning, we propose a uniform framework of differentiable TRG ($partial$TRG) that can be applied to improve various TRG methods, in an automatic fashion. Essentially, $partial$TRG systematically extends the concept of second renormalization [PRL 103, 160601 (2009)] where the tensor environment is computed recursively in the backward iteration, in the sense that given the forward process of TRG, $partial$TRG automatically finds the gradient through backpropagation, with which one can deeply train the tensor networks. We benchmark $partial$TRG in solving the square-lattice Ising model, and demonstrate its power by simulating one- and two-dimensional quantum systems at finite temperature. The deep optimization as well as GPU acceleration renders $partial$TRG manybody simulations with high efficiency and accuracy.