solved problems when saving/loading trainer objects, the optimizer was not being serialized/deserialzed properly