From 8394ee98784facc004be995bf497ec354848c70a Mon Sep 17 00:00:00 2001 From: zhengjun10 Date: Wed, 15 Dec 2021 16:00:09 +0800 Subject: [PATCH] fix albert loss not found issue --- mindspore/lite/include/train/train_cfg.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mindspore/lite/include/train/train_cfg.h b/mindspore/lite/include/train/train_cfg.h index 853da49733..1aa501729d 100644 --- a/mindspore/lite/include/train/train_cfg.h +++ b/mindspore/lite/include/train/train_cfg.h @@ -64,9 +64,9 @@ class TrainCfg { this->accumulate_gradients_ = rhs.accumulate_gradients_; return *this; } - std::vector loss_name_; /**< Set part of the name that identify a loss kernel */ - MixPrecisionCfg mix_precision_cfg_; /**< Mix precision configuration */ - bool accumulate_gradients_ = false; /**< If true gardents are accmulated and can be read by GetGradients */ + std::vector loss_name_ = {"loss_fct"}; /**< Set part of the name that identify a loss kernel */ + MixPrecisionCfg mix_precision_cfg_; /**< Mix precision configuration */ + bool accumulate_gradients_ = false; /**< If true gardents are accmulated and can be read by GetGradients */ }; } // namespace lite