exception_message="the training process can not be resumed due to optimizer set now and last time is different. Recommend to use `pretrain_weights` instead of `resume_checkpoint`"
iflen(optimizer_var_list)>0:
forvarinoptimizer_var_list:
ifvar.namenotinopt_dict:
raiseException(
"{} is not in saved paddlex optimizer, {}".format(
exception_message="the training process can not be resumed due to optimizer set now and last time is different. Recommend to use `pretrain_weights` instead of `resume_checkpoint`"