Skip to content

Commit bb489d4

Browse files
committed
add interp_method default bilinear. test=develop
1 parent ae84b9f commit bb489d4

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

paddle/fluid/operators/interpolate_op.cc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,12 @@ class InterpolateOpMaker : public framework::OpProtoAndCheckerMaker {
7676

7777
AddAttr<int>("out_h", "output height of interpolate op.");
7878
AddAttr<int>("out_w", "output width of interpolate op.");
79-
AddAttr<std::string>(
80-
"interp_method",
81-
"(string), interpolation method, can be \"bilinear\" for "
82-
"bilinear interpolation and \"nearest\" for nearest "
83-
"neighbor interpolation.");
79+
AddAttr<std::string>("interp_method",
80+
"(string, default \"bilinear\"), interpolation "
81+
"method, can be \"bilinear\" for "
82+
"bilinear interpolation and \"nearest\" for nearest "
83+
"neighbor interpolation.")
84+
.SetDefault("bilinear");
8485
AddComment(R"DOC(
8586
This operator samples input X to given output shape by using specified
8687
interpolation method, the interpolation methods can be \"nearest\"

0 commit comments

Comments
 (0)