|
|
@ -34,7 +34,7 @@ class AccuracyOp : public framework::OperatorWithKernel {
|
|
|
|
PADDLE_ENFORCE_EQ(inference->dims()[0], label->dims()[0],
|
|
|
|
PADDLE_ENFORCE_EQ(inference->dims()[0], label->dims()[0],
|
|
|
|
"inference size must be the same as label size");
|
|
|
|
"inference size must be the same as label size");
|
|
|
|
|
|
|
|
|
|
|
|
ctx.Output<Tensor>("Accuracy")->Resize({1});
|
|
|
|
ctx.Output<framework::LoDTensor>("Accuracy")->Resize({1});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|