MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / UniformIntNonZeroRNG

Class UniformIntNonZeroRNG

dnn/test/common/rng.h:141–150  ·  view source on GitHub ↗

range must be positive; each value would be negated with prob 0.5

Source from the content-addressed store, hash-verified

139
140//! range must be positive; each value would be negated with prob 0.5
141class UniformIntNonZeroRNG : public UniformIntRNG {
142 std::uniform_int_distribution<dt_int32> m_dist_flip{0, 1};
143
144public:
145 UniformIntNonZeroRNG(int a, int b) : UniformIntRNG(a, b) {
146 megdnn_assert(a > 0 && b > a);
147 }
148
149 dt_float32 gen_single_val() override;
150};
151
152class UniformFloatRNG : public IIDRNG {
153public:

Callers 1

TEST_FFunction · 0.85

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.68