Beispiel #1
0
 public ContextMap For(WrittenWord word)
 {
     if (_contextMapLookup.ContainsKey(word))
     {
         return _contextMapLookup[word];
     }
     var contextMap = new ContextMap();
     _contextMapLookup.Add(word,contextMap);
     return contextMap;
 }
Beispiel #2
0
 public TrainingAction(IPlan plan, ContextMaps maps)
     : base(plan,maps)
 {
     _contextMap = maps.For(plan.Word);
     _weights = _contextMap.NeuronWeights;
     if (!plan.Output.HasValue) throw new ArgumentException("plan.Output must be set", "plan");
     _wordVector = _vectors[plan.Word];
     if (_outputArray == null)
     {
         _outputArray = OutputToArray(plan.Output.Value);
     }
 }