504f7b18fe1037bf79da0119329f2aafdee4703a,thinc/initializers.py,,normal_init,#,52

Before Change


def normal_init(ops: Ops, shape: Shape, *, fan_in: int = -1) -> FloatsXd:
    if fan_in == -1:
        fan_in = shape[1]
    scale = ops.xp.sqrt(1.0 / fan_in)
    size = int(ops.xp.prod(ops.xp.asarray(shape)))
    inits = numpy.random.normal(scale=scale, size=size).astype("float32")
    inits = ops.reshape_f(inits, shape)
    return ops.asarray_f(inits)

After Change


def normal_init(ops: Ops, shape: Shape, *, fan_in: int = -1) -> FloatsXd:
    if fan_in == -1:
        fan_in = shape[1]
    scale = float(ops.xp.sqrt(1.0 / fan_in))
    size = int(ops.xp.prod(ops.xp.asarray(shape)))
    inits = numpy.random.normal(scale=scale, size=size).astype("float32")
    inits = ops.reshape_f(inits, shape)
    return ops.asarray_f(inits)

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 2

Instances


Project Name: explosion/thinc
Commit Name: 504f7b18fe1037bf79da0119329f2aafdee4703a
Time: 2020-02-18
Author: adrianeboyd@gmail.com
File Name: thinc/initializers.py
Class Name:
Method Name: normal_init


Project Name: luispedro/mahotas
Commit Name: c04b8a5143a8b53cc2bdf789921938edec3c31a9
Time: 2010-08-23
Author: lpc@cmu.edu
File Name: mahotas/zernike.py
Class Name:
Method Name: zernike


Project Name: nicola-decao/s-vae-pytorch
Commit Name: 3a3916adbe18066f8fdf854ae1c9edbb28103ec3
Time: 2018-07-28
Author: nicola.decao@student.uva.nl
File Name: hyperspherical_vae/distributions/von_mises_fisher.py
Class Name: VonMisesFisher
Method Name: __sample_w_rej


Project Name: suavecode/SUAVE
Commit Name: d68b29c1c774d15d4a58564c3001c22455a5558d
Time: 2015-11-18
Author: carlos.ilario@embraer.com.br
File Name: trunk/SUAVE/Methods/Noise/Fidelity_One/Engine/primary_noise_component.py
Class Name:
Method Name: primary_noise_component