public override void InitWeight(string name, ref NDArray arr) { arr.Constant(0); var num_hidden = Convert.ToInt32(arr.Shape[0] / 4); var data = arr.GetValues <float>(); for (var i = num_hidden; i < 2 * num_hidden; i++) { data[i] = ForgetBias; } arr.SyncCopyFromCPU(data); }
public override void InitWeight(string name, ref NDArray arr) { arr.Constant(1); }
public override void Generate(NDArray x) { x.Constant(this.Value); }