Skip to content
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 ConvolutionDepthwise layer #5665

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
satisfy the code format of caffe
sp2823 committed Jun 2, 2017
commit d40fbd8a994f1a68405101d78d25bddaf767f764
5 changes: 5 additions & 0 deletions src/caffe/layers/conv_dw_layer.cu
Original file line number Diff line number Diff line change
@@ -60,6 +60,7 @@ void ConvolutionDepthwiseLayer<Dtype>::Forward_gpu(
const int bottom_height = bottom[0]->height();
const int bottom_width = bottom[0]->width();
ConvolutionDepthwiseWeightForward<Dtype>
// NOLINT_NEXT_LINE(whitespace/operators)
<<<CAFFE_GET_BLOCKS(count), CAFFE_CUDA_NUM_THREADS>>>(
count, bottom_data, weight_data, num, channels,
top_height, top_width, bottom_height, bottom_width,
@@ -68,6 +69,7 @@ void ConvolutionDepthwiseLayer<Dtype>::Forward_gpu(
if (this->layer_param_.convolution_param().bias_term()) {
const Dtype* bias_data = this->blobs_[1]->gpu_data();
ConvolutionDepthwiseBiasForward<Dtype>
// NOLINT_NEXT_LINE(whitespace/operators)
<<<CAFFE_GET_BLOCKS(count), CAFFE_CUDA_NUM_THREADS>>>(
count, bias_data, num, channels,
top_height, top_width, top_data);
@@ -174,6 +176,7 @@ void ConvolutionDepthwiseLayer<Dtype>::Backward_gpu(
const int bias_buffer_count = bias_buffer_.count();
Dtype* bias_buffer_mutable_data = bias_buffer_.mutable_gpu_data();
ConvolutionDepthwiseBiasBackward<Dtype>
// NOLINT_NEXT_LINE(whitespace/operators)
<<<CAFFE_GET_BLOCKS(bias_buffer_count), CAFFE_CUDA_NUM_THREADS>>>(
bias_buffer_count, top_diff, num, channels,
top_height, top_width, bias_buffer_mutable_data);
@@ -189,6 +192,7 @@ void ConvolutionDepthwiseLayer<Dtype>::Backward_gpu(
const Dtype* bottom_data = bottom[0]->gpu_data();
Dtype* weight_buffer_mutable_data = weight_buffer_.mutable_gpu_data();
ConvolutionDepthwiseWeightBackward<Dtype>
// NOLINT_NEXT_LINE(whitespace/operators)
<<<CAFFE_GET_BLOCKS(weight_buffer_count), CAFFE_CUDA_NUM_THREADS>>>(
weight_buffer_count, top_diff, bottom_data, num, channels,
top_height, top_width, bottom_height, bottom_width,
@@ -205,6 +209,7 @@ void ConvolutionDepthwiseLayer<Dtype>::Backward_gpu(
const Dtype* weight_data = this->blobs_[0]->gpu_data();
Dtype* bottom_diff = bottom[0]->mutable_gpu_diff();
ConvolutionDepthwiseBottomBackward<Dtype>
// NOLINT_NEXT_LINE(whitespace/operators)
<<<CAFFE_GET_BLOCKS(bottom_count), CAFFE_CUDA_NUM_THREADS>>>(
bottom_count, top_diff, weight_data, num, channels,
top_height, top_width, bottom_height, bottom_width,