f"Invalid optim model for optim scope({optim_scope}), number of optim_model={len(optim_model)}, and number of optim_model's params={len(optim_model[0].parameters())}"
else:
forminmodel_list[i].sublayers(True):
ifm.__class__.__name__==optim_scope:
optim_model.append(model_list[i])
assertlen(optim_model)==1, \
"Invalid optim model for optim scope({}), number of optim_model={}".format(optim_scope,len(optim_model))