save the trained parameters