未验证 提交 e63297f5 编写于 作者: R ronnywang 提交者: GitHub

[CustomDevice] remove the constraint of ignore_idnex in c_softmax_with_cross_entropy (#56486)

上级 51c4028c
......@@ -320,12 +320,6 @@ class CSoftmaxWithCrossEntropyOpCustomDeviceKernel
auto loss_dims = loss->dims();
const int64_t ignore_index = ctx.Attr<int64_t>("ignore_index");
PADDLE_ENFORCE_LT(ignore_index,
0,
platform::errors::InvalidArgument(
"When SoftmaxWithCrossEntropy run on CustomDevice, "
"ignore_index should be <=0, however it's %ld",
ignore_index));
const int rid = ctx.Attr<int>("ring_id");
const int rank = ctx.Attr<int>("rank");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册