// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. #ifndef __OPENCV_DNN_LAYERS_LAYERS_COMMON_HPP__ #define __OPENCV_DNN_LAYERS_LAYERS_COMMON_HPP__ #include #include #define CV_CPU_OPTIMIZATION_DECLARATIONS_ONLY // dispatched AVX/AVX2 optimizations #include "./layers_common.simd.hpp" #include "int8layers/layers_common.simd_declarations.hpp" #undef CV_CPU_OPTIMIZATION_DECLARATIONS_ONLY #ifdef HAVE_OPENCL #include "../ocl4dnn/include/ocl4dnn.hpp" #endif namespace cv { namespace dnn { void getConvolutionKernelParams(const LayerParams ¶ms, std::vector& kernel, std::vector& pads_begin, std::vector& pads_end, std::vector& strides, std::vector& dilations, cv::String &padMode, std::vector& adjust_pads); void getPoolingKernelParams(const LayerParams ¶ms, std::vector& kernel, std::vector& globalPooling, std::vector& pads_begin, std::vector& pads_end, std::vector& strides, cv::String &padMode); void getConvPoolOutParams(const std::vector& inp, const std::vector& kernel, const std::vector& stride, const String &padMode, const std::vector& dilation, std::vector& out); void getConvPoolPaddings(const std::vector& inp, const std::vector& kernel, const std::vector& strides, const String &padMode, std::vector& pads_begin, std::vector& pads_end); } } #endif