1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

dnn: refactor reduce (#23613)

* initial impl

* remove reduce in8; fix reduce importer

* fix bugs and add log sum exp

* remove unnecessary header and fix indentation
This commit is contained in:
Yuantao Feng
2023-05-17 15:03:45 +08:00
committed by GitHub
parent 5229312ad2
commit eefee8574a
5 changed files with 481 additions and 726 deletions
@@ -346,18 +346,9 @@ CV__DNN_INLINE_NS_BEGIN
class CV_EXPORTS ReduceLayer : public Layer
{
public:
int reduceType;
// reduceDims contains the dimensions that need to be reduced, targetDims is the target output dimension.
std::vector<size_t> reduceDims, targetDims;
static Ptr<ReduceLayer> create(const LayerParams& params);
};
class CV_EXPORTS ReduceLayerInt8 : public ReduceLayer
{
public:
static Ptr<ReduceLayerInt8> create(const LayerParams& params);
};
class CV_EXPORTS SoftmaxLayer : public Layer
{
public: