|
|
@ -34,6 +34,7 @@ class ClipOp : public framework::OperatorWithKernel {
|
|
|
|
auto min = Attr<float>("min");
|
|
|
|
auto min = Attr<float>("min");
|
|
|
|
PADDLE_ENFORCE_LT(min, max, "max should be greater than min.");
|
|
|
|
PADDLE_ENFORCE_LT(min, max, "max should be greater than min.");
|
|
|
|
ctx->SetOutputDim("Out", x_dims);
|
|
|
|
ctx->SetOutputDim("Out", x_dims);
|
|
|
|
|
|
|
|
ctx->ShareLoD("X", /*->*/ "Out");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|