A Systematic Approach to Blocking Convolutional Neural Networks