Deep Neural Networks Can Learn Generalizable Same-Different Visual Relations