Пример #1
0
 public void SetFilters(TensorOld filters)
 {
     if (Filters == null)
     {
         foreach (var item in mirrorList)
         {
             item.Filters = filters;
         }
     }
     TensorOld.CheckShape(filters, Filters);
     Array.Copy(filters.values, 0, Filters.values, 0, Filters.ElementCount);
 }
Пример #2
0
 public void SetBias(TensorOld bias)
 {
     if (Bias == null)
     {
         foreach (var item in mirrorList)
         {
             item.Bias = bias;
         }
     }
     TensorOld.CheckShape(Bias, bias);
     Array.Copy(bias.GetRawValues(), 0, Bias.GetRawValues(), 0, Bias.ElementCount);
 }
Пример #3
0
 /// <summary>
 /// 手动设置权重
 /// </summary>
 /// <param name="weights"></param>
 public void SetWeights(TensorOld weights)
 {
     if (Weights == null)
     {
         foreach (var item in mirrorList)
         {
             item.Weights = weights;
         }
     }
     TensorOld.CheckShape(weights, Weights);
     Array.Copy(weights.GetRawValues(), 0, Weights.GetRawValues(), 0, Weights.ElementCount);
 }