-
Notifications
You must be signed in to change notification settings - Fork 18.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
Use Blob directly instead of shared_ptr for internal layer buffers #742
Merged
Conversation
This file contains 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
…ltiplier_ This will make layer reshaping easier and more uniform, and is consistent with col_buffer_.
Again, this is more uniform, and will simplify the implementation of Reshape.
This will simplify the implementation of Reshape by making allocation automatic. There is no need for shared_ptr here, and this is more uniform with buffers used by other layers.
I guess the argument for using a shared_ptr would be to save the time and memory of actually constructing a blob when it's not needed (e.g. if you're not using a bias term in the convolution layer you'd never allocate a bias_multiplier blob at all), but in the case of |
jeffdonahue
added a commit
that referenced
this pull request
Jul 20, 2014
Use Blob directly instead of shared_ptr for internal layer buffers
longjon
added a commit
to longjon/caffe
that referenced
this pull request
Sep 12, 2014
This is in keeping with BVLC#742.
longjon
added a commit
to shelhamer/caffe
that referenced
this pull request
Sep 18, 2014
This is in keeping with BVLC#742.
mitmul
pushed a commit
to mitmul/caffe
that referenced
this pull request
Sep 30, 2014
Use Blob directly instead of shared_ptr for internal layer buffers
mitmul
pushed a commit
to mitmul/caffe
that referenced
this pull request
Sep 30, 2014
This is in keeping with BVLC#742.
RazvanRanca
pushed a commit
to RazvanRanca/caffe
that referenced
this pull request
Nov 4, 2014
Use Blob directly instead of shared_ptr for internal layer buffers
RazvanRanca
pushed a commit
to RazvanRanca/caffe
that referenced
this pull request
Nov 4, 2014
This is in keeping with BVLC#742.
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.
(This PR separates out and extends some of the cleanup from #594 for more expedient merging.)
Many layers have internal buffers. Currently, some are declared as
Blob
, while some are declared asshared_ptr<Blob>
(and some used to be declared asshared_ptr<SyncedMemory>
, although that is no longer as of fb8c061).This PR changes all internal buffers to be
Blob
. Aside from consistency, this prepares internal buffers to be reshapable under #594. There are two reasons for this:Reshape
.