未验证 提交 e891f4da 编写于 作者: myq406450149's avatar myq406450149 提交者: GitHub

Add p_norm op version info (#30042)


* p_norm fix op version info. test=develop
上级 7d1c149e
......@@ -16,6 +16,7 @@ limitations under the License. */
#include <memory>
#include <string>
#include <vector>
#include "paddle/fluid/framework/op_version_registry.h"
namespace paddle {
namespace operators {
......@@ -174,3 +175,11 @@ REGISTER_OP_CPU_KERNEL(p_norm, ops::PnormKernel<CPU, float>,
ops::PnormKernel<CPU, double>);
REGISTER_OP_CPU_KERNEL(p_norm_grad, ops::PnormGradKernel<CPU, float>,
ops::PnormGradKernel<CPU, double>);
REGISTER_OP_VERSION(p_norm)
.AddCheckpoint(
R"ROC(
Upgrade p_norm, add 1 attribute [asvector].
)ROC",
paddle::framework::compatible::OpVersionDesc().NewAttr(
"asvector",
"Compute as vector when axis is None and input is matrix", false));
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册