Improving generalization by mimicking the human visual diet