Practical Kronecker-factored BFGS and L-BFGS methods for training deep neural networks