diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2017-10-23 20:29:30 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | 81a26ad6b626ce2da83659d7c6c17b6104d1f203 (patch) | |
tree | 536807115771f1a4b06048892d1d4e17c98779de /tests/validation/CPP/DepthwiseConvolution.cpp | |
parent | 511347a7282b948bddfc071e9a8fa08e79da25b4 (diff) | |
download | ComputeLibrary-81a26ad6b626ce2da83659d7c6c17b6104d1f203.tar.gz |
COMPMID-643: Add bias to CLDepthwiseConvolution.
Change-Id: Ibfe7b8c1172d10cbcae7971fe86b82090519d31d
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/92798
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Jaroslaw Rzepecki <jaroslaw.rzepecki@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/validation/CPP/DepthwiseConvolution.cpp')
-rw-r--r-- | tests/validation/CPP/DepthwiseConvolution.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/validation/CPP/DepthwiseConvolution.cpp b/tests/validation/CPP/DepthwiseConvolution.cpp index b57c2686f6..e29d014f77 100644 --- a/tests/validation/CPP/DepthwiseConvolution.cpp +++ b/tests/validation/CPP/DepthwiseConvolution.cpp @@ -45,7 +45,7 @@ namespace reference * */ template <typename T> -SimpleTensor<T> depthwise_convolution(const SimpleTensor<T> &src, const SimpleTensor<T> &weights, const TensorShape &dst_shape, const PadStrideInfo &conv_info) +SimpleTensor<T> depthwise_convolution(const SimpleTensor<T> &src, const SimpleTensor<T> &weights, const SimpleTensor<T> &biases, const TensorShape &dst_shape, const PadStrideInfo &conv_info) { // Create reference SimpleTensor<T> dst{ dst_shape, src.data_type(), 1, src.fixed_point_position() }; @@ -97,7 +97,7 @@ SimpleTensor<T> depthwise_convolution(const SimpleTensor<T> &src, const SimpleTe } coords.set(0, x); coords.set(1, y); - dst[out_pos++] = saturate_cast<T>(val); + dst[out_pos++] = saturate_cast<T>(val + *static_cast<const T *>(biases(Coordinates(z)))); } } } @@ -106,7 +106,8 @@ SimpleTensor<T> depthwise_convolution(const SimpleTensor<T> &src, const SimpleTe return dst; } -template SimpleTensor<float> depthwise_convolution(const SimpleTensor<float> &src, const SimpleTensor<float> &weights, const TensorShape &dst_shape, const PadStrideInfo &conv_info); +template SimpleTensor<float> depthwise_convolution(const SimpleTensor<float> &src, const SimpleTensor<float> &weights, const SimpleTensor<float> &biases, const TensorShape &dst_shape, + const PadStrideInfo &conv_info); } // namespace reference } // namespace validation } // namespace test |