Nonlinear Pairwise Layer and Its Training for Kernel Learning