| 53 | }; |
| 54 | |
| 55 | class Uniform : public Initializer { |
| 56 | public: |
| 57 | Uniform() = default; |
| 58 | Uniform(const float low, const float high) : min_(low), max_(high) {} |
| 59 | void Setup(const InitializerConf& conf) override { |
| 60 | min_ = conf.min(); |
| 61 | max_ = conf.max(); |
| 62 | } |
| 63 | void Fill(Tensor& t) override { singa::Uniform(min_, max_, &t); } |
| 64 | |
| 65 | private: |
| 66 | float min_ = 0, max_ = 1; |
| 67 | }; |
| 68 | |
| 69 | class Gaussian : public Initializer { |
| 70 | public: |