提交 bd8b0eba 编写于 作者: B Bai Yifan 提交者: whs

fix distiller typo, test=develop (#21070)

上级 f62a9291
...@@ -269,7 +269,7 @@ class SoftLabelDistillerPass(object): ...@@ -269,7 +269,7 @@ class SoftLabelDistillerPass(object):
t_fea = layers.softmax(teacher_feature_map / t_fea = layers.softmax(teacher_feature_map /
self.teacher_temperature) self.teacher_temperature)
t_fea.stop_gradient = True t_fea.stop_gradient = True
ce_loss = layres.reduce_mean( ce_loss = layers.reduce_mean(
layers.cross_entropy( layers.cross_entropy(
s_fea, t_fea, soft_label=True)) s_fea, t_fea, soft_label=True))
distillation_loss = ce_loss * self.distillation_loss_weight distillation_loss = ce_loss * self.distillation_loss_weight
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册