Add p_norm op version info (#30042)

* p_norm fix op version info. test=develop
revert-31562-mean
yongqiangma 4 years ago committed by GitHub
parent 7d1c149e09
commit e891f4da1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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));

Loading…
Cancel
Save