예제 #1
0
 public void initOptimizer()
 {
     if (Global.modelOptimizer.StartsWith("sapo"))
     {
         _optim = new optimSAPO(this);
     }
     else
     {
         _optim = new optimPercMIRA(this);
     }
 }
예제 #2
0
 public void initOptimizer()
 {
     //_optimType = Global.optimizer;
     if (Global.modelOptimizer.StartsWith("crf"))
     {
         if (Global.modelOptimizer.EndsWith("sgd") || Global.modelOptimizer.EndsWith("sgder") || Global.modelOptimizer.EndsWith("adf"))
         {
             _optim = new optimStochastic(this);
         }
         else if (Global.modelOptimizer.EndsWith("bfgs"))
         {
             _optim = new optimLBFGS(this, _model.W, Global.mBFGS, 0, Global.ttlIter);
         }
         else
         {
             throw new Exception("error");
         }
     }
     else
     {
         throw new Exception("error");
     }
 }
예제 #3
0
 public inference(toolbox tb)
 {
     _optim = tb.Optim;
     _fGene = tb.FGene;
 }
예제 #4
0
 public gradient(toolbox tb)
 {
     _optim = tb.Optim;
     _inf   = tb.Inf;
     _fGene = tb.FGene;
 }
예제 #5
0
 public inference(toolbox tb)
 {
     _optim = tb.Optim;
     _fGene = tb.FGene;
     _grad  = tb.Grad;
 }
예제 #6
0
 public void initOptimizer()
 {
     _optim = new optimPerc(this);
 }