protected override void CreateState(int index, NDArray weight) { this._Mean[index] = new NDArray(weight.GetShape(), weight.GetContext()); this._Mean[index].Set(0); this._Var[index] = new NDArray(weight.GetShape(), weight.GetContext()); this._Var[index].Set(0); }
protected override void CreateState(int index, NDArray weight) { if (!this.Params.ContainsKey("momentum")) { this._States[index] = null; } else { this._States[index] = new NDArray(weight.GetShape(), weight.GetContext()); this._States[index].Set(0); } }