def test_he_uniform_gain():
    from lasagne.init import HeUniform

    sample = HeUniform(gain=10.0).sample((300, 200))
    assert -1.0 <= sample.min() < -0.9
    assert 0.9 < sample.max() <= 1.0

    sample = HeUniform(gain='relu').sample((100, 100))
    assert -0.1 < sample.mean() < 0.1
    assert 0.1 < sample.std() < 0.2
dataset/ETHPy150Open Lasagne/Lasagne/lasagne/tests/test_init.py/test_he_uniform_gain/original