mirror of https://github.com/alibaba/MNN.git
28 lines
578 B
C++
28 lines
578 B
C++
//
|
|
// Distributions.hpp
|
|
// MNN
|
|
//
|
|
// Created by MNN on 2019/11/28.
|
|
// Copyright © 2018, Alibaba Group Holding Limited
|
|
//
|
|
|
|
#ifndef Distributions_hpp
|
|
#define Distributions_hpp
|
|
|
|
#include <MNN/MNNDefine.h>
|
|
#include <random>
|
|
|
|
namespace MNN {
|
|
namespace Express {
|
|
|
|
class Distributions {
|
|
public:
|
|
static void uniform(const int count, const float min, const float max, float* r, std::mt19937 gen);
|
|
static void gaussian(const int count, const float mu, const float sigma, float* r, std::mt19937 gen);
|
|
};
|
|
|
|
} // namespace Express
|
|
} // namespace MNN
|
|
|
|
#endif // Distritutions_hpp
|