예제 #1
0
 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);
 }
예제 #2
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);
     }
 }