Improved Dropout for Shallow and Deep Learning