1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Merge pull request #29081 from ssam18:fix/issue-29072-randomnormallike-4x

dnn: register RandomNormalLike layer explicitly in init.cpp
This commit is contained in:
Alexander Smorkalov
2026-05-21 20:44:23 +03:00
committed by GitHub
3 changed files with 12 additions and 3 deletions
@@ -1204,6 +1204,12 @@ CV__DNN_INLINE_NS_BEGIN
static Ptr<TopKLayer> create(const LayerParams& params);
};
class CV_EXPORTS RandomNormalLikeLayer : public Layer
{
public:
static Ptr<RandomNormalLikeLayer> create(const LayerParams& params);
};
//! @}
//! @}
CV__DNN_INLINE_NS_END
+1
View File
@@ -200,6 +200,7 @@ void initializeLayerFactory()
CV_DNN_REGISTER_LAYER_CLASS(ScatterND, ScatterNDLayer);
CV_DNN_REGISTER_LAYER_CLASS(Tile, TileLayer);
CV_DNN_REGISTER_LAYER_CLASS(TopK, TopKLayer);
CV_DNN_REGISTER_LAYER_CLASS(RandomNormalLike, RandomNormalLikeLayer);
CV_DNN_REGISTER_LAYER_CLASS(Quantize, QuantizeLayer);
CV_DNN_REGISTER_LAYER_CLASS(Dequantize, DequantizeLayer);
@@ -6,12 +6,11 @@
#include "../precomp.hpp"
#include "layers_common.hpp"
#include <opencv2/dnn/layer.details.hpp>
#include <cmath>
namespace cv { namespace dnn {
class RandomNormalLikeLayerImpl CV_FINAL : public Layer
class RandomNormalLikeLayerImpl CV_FINAL : public RandomNormalLikeLayer
{
public:
RandomNormalLikeLayerImpl(const LayerParams& params)
@@ -117,6 +116,9 @@ private:
int depth;
};
CV_DNN_REGISTER_LAYER_CLASS_STATIC(RandomNormalLike, RandomNormalLikeLayerImpl);
Ptr<RandomNormalLikeLayer> RandomNormalLikeLayer::create(const LayerParams& params)
{
return makePtr<RandomNormalLikeLayerImpl>(params);
}
}} // namespace cv::dnn