fix fan_in renaming

This commit is contained in:
svlandeg 2020-05-12 13:56:10 +02:00
parent 9fe1e23512
commit 102c8c7e2f

View File

@ -110,7 +110,8 @@ def init(model, X=None, Y=None):
pad = model.ops.alloc4f(1, nF, nO, nP)
ops = model.ops
W = normal_init(ops, W.shape, fan_in=nF * nI)
scale = float(ops.xp.sqrt(1.0 / (nF * nI)))
W = normal_init(ops, W.shape, mean=scale)
model.set_param("W", W)
model.set_param("b", b)
model.set_param("pad", pad)