diff options
Diffstat (limited to 'src/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.cpp')
-rw-r--r-- | src/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.cpp b/src/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.cpp index 7121654a75..d9aa50d9e1 100644 --- a/src/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.cpp +++ b/src/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.cpp @@ -31,11 +31,12 @@ using namespace arm_compute; GCDepthwiseConvolutionLayer3x3::GCDepthwiseConvolutionLayer3x3() - : _kernel(nullptr), _border_handler(), _shift_handler() + : _kernel(nullptr), _border_handler(), _shift_handler(), _activationlayer_function(), _is_activationlayer_enabled(false) { } -void GCDepthwiseConvolutionLayer3x3::configure(IGCTensor *input, const IGCTensor *weights, const IGCTensor *biases, IGCTensor *output, const PadStrideInfo &conv_info, unsigned int depth_multiplier) +void GCDepthwiseConvolutionLayer3x3::configure(IGCTensor *input, const IGCTensor *weights, const IGCTensor *biases, IGCTensor *output, const PadStrideInfo &conv_info, + unsigned int depth_multiplier, const ActivationLayerInfo &act_info) { auto k = arm_compute::support::cpp14::make_unique<GCDepthwiseConvolutionLayer3x3Kernel>(); k->configure(input, weights, biases, output, conv_info, depth_multiplier); @@ -45,6 +46,14 @@ void GCDepthwiseConvolutionLayer3x3::configure(IGCTensor *input, const IGCTensor _border_handler.configure(input, _kernel->border_size(), BorderMode::CONSTANT, PixelValue(0)); _shift_handler.configure(input); + + //Configure Activation Layer + _is_activationlayer_enabled = act_info.enabled(); + + if(_is_activationlayer_enabled) + { + _activationlayer_function.configure(output, nullptr, act_info); + } } void GCDepthwiseConvolutionLayer3x3::run() @@ -54,4 +63,10 @@ void GCDepthwiseConvolutionLayer3x3::run() GCScheduler::get().dispatch(_border_handler, false); GCScheduler::get().memory_barrier(); GCScheduler::get().dispatch(*_kernel); + + // Run Activation Layer + if(_is_activationlayer_enabled) + { + _activationlayer_function.run(); + } } |