Learning contextual relationships in mammograms using a pyramid neural network