We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Extra memory is allocated for scale_ in SoftmaxLayer.
SoftmaxLayer
See the code below
outer_num_ = bottom[0]->count(0, softmax_axis_); inner_num_ = bottom[0]->count(softmax_axis_ + 1); vector<int> scale_dims = bottom[0]->shape(); scale_dims[softmax_axis_] = 1; scale_.Reshape(scale_dims);
scale_ only needs inner_num_ of bytes, but outer_num_*inner_num_ of bytes are allocated.
scale_
inner_num_
outer_num_*inner_num_
The text was updated successfully, but these errors were encountered:
avoid allocating extra memory (fix BVLC#6596).
e7ae701
Successfully merging a pull request may close this issue.
Issue summary
Extra memory is allocated for scale_ in
SoftmaxLayer
.Steps to reproduce
See the code below
scale_
only needsinner_num_
of bytes, butouter_num_*inner_num_
of bytes are allocated.The text was updated successfully, but these errors were encountered: