Generalizing Pooling Functions in Convolutional Neural Networks: Mixed, Gated, and Tree