Add parameter for pooling layer to specify "ceil" or "floor"#3057
Closed
dujianyi wants to merge 2 commits intoBVLC:masterfrom
Closed
Add parameter for pooling layer to specify "ceil" or "floor"#3057dujianyi wants to merge 2 commits intoBVLC:masterfrom
dujianyi wants to merge 2 commits intoBVLC:masterfrom
Conversation
|
It might be more intuitive/readable to have this be an enum with choices FLOOR and CEIL. |
Contributor
|
See also #1318... |
Author
|
@longjon Has that issue been solved? |
franciszzj
reviewed
May 20, 2017
include/caffe/vision_layers.hpp
Outdated
| int height_, width_; | ||
| int pooled_height_, pooled_width_; | ||
| bool global_pooling_; | ||
| bool ceil_mode; |
|
working C++ code for floor and ceil can be found at https://www.tutorialcup.com/array/floor-ceil.htm |
dkurt
added a commit
to dkurt/opencv
that referenced
this pull request
Oct 16, 2017
dkurt
added a commit
to dkurt/opencv
that referenced
this pull request
Oct 18, 2017
Contributor
|
how to modify the pooling_layer.cu ? |
|
Thank you. Can you also update pooling_layer.hpp? Currently the new variable ceil_mode_ is only added to vision_layers.hpp (not sure where this file will be used; apparently pooling_layer.hpp doesn't include it). |
IlyaOvodov
added a commit
to IlyaOvodov/caffe
that referenced
this pull request
Feb 14, 2018
Site1997
approved these changes
Mar 6, 2018
Member
|
@Noiredd in light of PR#6282, can we close this PR? |
keerthanss
added a commit
to keerthanss/DenseNet-Caffe
that referenced
this pull request
Feb 27, 2019
ceil_mode was proposed in BVLC/caffe#3057 , but never merged. Its replacement, BVLC/caffe#6282 , fulfils the same need with some syntactic variance. The param is now called "round_mode" and it is an enum, instead of a boolean. This commit modifies the files accordingly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When I am trying to convert
torch.nnnetwork to caffe, I met the problem that I can't specifyfloormode for MaxPooling to calculate the output size. Innn, you can specify it freely between:ceil()and:floor(), so it could be better to include this parameter for users to choose.