sub-optimal solutions from each step; Second, the trained network can be transferred to another dataset without explicit reliance on ROI annotations. Large mammography databases with ROI annotations are rare and expensive to obtain. The largest public database with ROI annotations for digitized film mammograms – DDSM [@heath_digital_2001] – contains several thousand images with pixel-level annotations, which can be exploited to train a patch classifier $f$. Once the patch classifier is converted into a whole image classifier $h$, it can be fine-tuned on other databases using only image-level labels. This approach allows us to significantly reduce the requirement for ROI annotations, and has many applications in medical imaging in addition to mammographic breast cancer classification. Practically, variable input size is a feature that is supported by most major deep learning frameworks [@chollet_keras_2015; @abadi_tensorflow_2015; @jia_caffe_2014; @chen_mxnet_2015], making it easy to implement.

![Converting a patch classifier to an end-to-end trainable whole image classifier using an all convolutional design where we considered removing the heatmap to improve information flow and convolutional layers as top layers; the magnifying glass shows an enlarged version of the heatmap.[]{data-label="fig:patch2image"}](Patch2image_algo.jpg){width="\linewidth"}

Network design
--------------

A modern CNN is typically constructed by stacking convolutional layers on top of the input, followed 