A self-regulated convolutional neural network for classifying variable stars