Created by: reyoung
We always use string compare to get active type every mini-batch. It is very slow.