MCPcopy Create free account
hub / github.com/apache/singa / Uniform

Class Uniform

include/singa/model/initializer.h:55–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53};
54
55class Uniform : public Initializer {
56public:
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
69class Gaussian : public Initializer {
70public:

Callers 2

FillMethod · 0.70
FillMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected