Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SeetaResearch
/
Dragon
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 88ba833a
authored
Jul 28, 2017
by
Ting PAN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix nvcc compiling error under linux
1 parent
04a86756
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
Dragon/src/operators/utils/proposal_op.cu
Dragon/src/operators/utils/proposal_op.cu
View file @
88ba833
...
...
@@ -322,20 +322,20 @@ void nms_gpu(const int num_boxes,
template <class Context> template <typename T>
void ProposalOp<Context>::RunWithType() {
auto* p_bottom_item = input(0).template data<T, CUDAContext>();
auto* p_d_anchor_item = input(1).template data<T, CUDAContext>();
auto* p_img_info_cpu = input(2).template data<T, CPUContext>();
auto* p_roi_item = output(0)->template mutable_data<T, CUDAContext>();
auto* p_score_item = (
OutputSize() > 1) ?
output(1)->template mutable_data<T, CUDAContext>() : NULL;
auto* p_bottom_item =
this->
input(0).template data<T, CUDAContext>();
auto* p_d_anchor_item =
this->
input(1).template data<T, CUDAContext>();
auto* p_img_info_cpu =
this->
input(2).template data<T, CPUContext>();
auto* p_roi_item =
this->
output(0)->template mutable_data<T, CUDAContext>();
auto* p_score_item = (
this->OutputSize() > 1) ? this->
output(1)->template mutable_data<T, CUDAContext>() : NULL;
vector<TIndex> proposals_shape(2), top_shape(2);
proposals_shape[0] = 0; proposals_shape[1] = 5;
top_shape[0] = 0; top_shape[1] = 5;
for (int n = 0; n < input(0).dim(0); ++n) {
for (int n = 0; n <
this->
input(0).dim(0); ++n) {
// bottom shape: (2 x num_anchors) x H x W
const int bottom_H = input(0).dim(2);
const int bottom_W = input(0).dim(3);
const int bottom_H =
this->
input(0).dim(2);
const int bottom_W =
this->
input(0).dim(3);
// input image height & width
const T img_H = p_img_info_cpu[0];
const T img_W = p_img_info_cpu[1];
...
...
@@ -388,13 +388,13 @@ void ProposalOp<Context>::RunWithType() {
top_shape[0] += num_rois;
}
output(0)->Reshape(top_shape);
if (OutputSize() > 1) {
this->
output(0)->Reshape(top_shape);
if (
this->
OutputSize() > 1) {
top_shape.pop_back();
output(1)->Reshape(top_shape);
this->
output(1)->Reshape(top_shape);
}
}
template void ProposalOp<CUDAContext>::RunWithType<float>();
}
\ No newline at end of file
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment