From 7fa2e821e470411b75ba0f53a3759fa007391745 Mon Sep 17 00:00:00 2001 From: tangwei12 Date: Thu, 6 Dec 2018 17:53:05 +0800 Subject: [PATCH] add local scope in nce --- paddle/fluid/operators/nce_op.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paddle/fluid/operators/nce_op.h b/paddle/fluid/operators/nce_op.h index 7397d9f47..afb14c307 100644 --- a/paddle/fluid/operators/nce_op.h +++ b/paddle/fluid/operators/nce_op.h @@ -194,6 +194,8 @@ class NCEKernel : public framework::OpKernel { sample_out_data[i] += result(0); sample_out_data[i] = (1. / (1. + exp(-sample_out_data[i]))); } + + context.scope().DeleteScope(&local_scope); #endif } else { auto weight_mat = -- GitLab