Added <repopulateGrad> function for keeping training a pre-trained net