make l2 loss able to learn only rows or columns