Implementation of spatial pyramid pooling in deep convolutional networks for visual recognition