-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add spp(Spatial pyramid pooling ) op #6204
Conversation
paddle/operators/spp_op.cc
Outdated
"M = C * H * W"); | ||
AddAttr<int>("pyramid_height", "(int), multi level pooling"); | ||
AddComment(R"DOC( | ||
"Does spatial pyramid pooling on the input image by taking the max, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The document is too simple to be easy to understand for the novice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
paddle/operators/spp_op.h
Outdated
std::vector<int64_t> output_shape_vec({in_x->dims()[0], in_x->dims()[1]}); | ||
output_shape_vec.push_back( | ||
(input_h - kernel_size_h + 2 * padding_h) / kernel_size_h + 1); | ||
output_shape_vec.push_back( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is (input_h - kernel_size_h + 2 * padding_h) / kernel_size_h + 1)
equals to bins
? Why do we have to recaulate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
paddle/operators/spp_op.h
Outdated
framework::DDim output_flatten_shape( | ||
framework::make_ddim(output_flatten_shape_vec)); | ||
out_flatten_level.ShareDataWith(out_level); | ||
out_flatten_level.Resize(output_flatten_shape); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not use out_level
to resize, but reapply a new variable out_flatten_level
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
paddle/operators/spp_op.h
Outdated
framework::Tensor out_level; | ||
framework::Tensor outgrad_level; | ||
std::vector<int64_t> out_shape_vec({in_x->dims()[0], in_x->dims()[1]}); | ||
out_shape_vec.push_back( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
paddle/operators/spp_op.cc
Outdated
"M = C * H * W"); | ||
AddAttr<int>("pyramid_height", "(int), multi level pooling"); | ||
AddComment(R"DOC( | ||
"Does spatial pyramid pooling on the input image by taking the max, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
paddle/operators/spp_op.h
Outdated
std::vector<int64_t> output_shape_vec({in_x->dims()[0], in_x->dims()[1]}); | ||
output_shape_vec.push_back( | ||
(input_h - kernel_size_h + 2 * padding_h) / kernel_size_h + 1); | ||
output_shape_vec.push_back( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
paddle/operators/spp_op.h
Outdated
framework::DDim output_flatten_shape( | ||
framework::make_ddim(output_flatten_shape_vec)); | ||
out_flatten_level.ShareDataWith(out_level); | ||
out_flatten_level.Resize(output_flatten_shape); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
paddle/operators/spp_op.h
Outdated
framework::Tensor out_level; | ||
framework::Tensor outgrad_level; | ||
std::vector<int64_t> out_shape_vec({in_x->dims()[0], in_x->dims()[1]}); | ||
out_shape_vec.push_back( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
fix #5988