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

Method Fill

include/singa/model/initializer.h:99–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97class MSRA : public Initializer {
98 public:
99 void Fill(Tensor& t) override {
100 CHECK_EQ(t.nDim(), 2u);
101 float std = sqrt(2.0f / t.shape(0));
102 singa::Gaussian(0.0f, std, &t);
103 }
104};
105
106} // namespace init

Callers 2

TESTFunction · 0.45
CompileMethod · 0.45

Calls 4

nDimMethod · 0.80
shapeMethod · 0.80
GaussianClass · 0.70
sqrtFunction · 0.50

Tested by 1

TESTFunction · 0.36