Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
97
class 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
TEST
Function · 0.45
Compile
Method · 0.45
Calls
4
nDim
Method · 0.80
shape
Method · 0.80
Gaussian
Class · 0.70
sqrt
Function · 0.50
Tested by
1
TEST
Function · 0.36