From c417f991c191ed960811247fdc6f4ee5bd3f1223 Mon Sep 17 00:00:00 2001 From: Bai Yifan Date: Mon, 25 May 2020 17:16:06 +0800 Subject: [PATCH] fix teacher_student_sigmoid_loss dtype check, test=develop (#24586) --- python/paddle/fluid/layers/loss.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/layers/loss.py b/python/paddle/fluid/layers/loss.py index abaa9888c8..805c8f8168 100644 --- a/python/paddle/fluid/layers/loss.py +++ b/python/paddle/fluid/layers/loss.py @@ -1536,9 +1536,11 @@ def teacher_student_sigmoid_loss(input, cost = fluid.layers.teacher_student_sigmoid_loss(input=similarity, label=label) """ - check_variable_and_dtype(input, "input", ['float32', 'float64'], + check_variable_and_dtype(input, "input", + ['float32', 'float64', 'int32', 'int64'], 'teacher_student_sigmoid_loss') - check_variable_and_dtype(label, "label", ['float32', 'float64'], + check_variable_and_dtype(label, "label", + ['float32', 'float64', 'int32', 'int64'], 'teacher_student_sigmoid_loss') helper = LayerHelper('teacher_student_sigmoid_loss', **locals()) -- GitLab