add local scope in nce

revert-15207-remove_op_handle_lock_and_fix_var
tangwei12 6 years ago
parent 627a6b8bac
commit 7fa2e821e4

@ -194,6 +194,8 @@ class NCEKernel : public framework::OpKernel<T> {
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 =

Loading…
Cancel
Save