Added support to sparsify before training.