コード例 #1
0
ファイル: LossLayer.cs プロジェクト: arnavdas88/dnn
 /// <summary>
 /// Initializes a new instance of the <see cref="LossLayer"/> class, using the existing <see cref="LossLayer"/> object.
 /// </summary>
 /// <param name="other">The <see cref="LossLayer"/> to copy the data from.</param>
 protected LossLayer(LossLayer other)
     : base(other)
 {
     this.NumberOfClasses = other.NumberOfClasses;
 }
コード例 #2
0
ファイル: LossLayer.cs プロジェクト: arnavdas88/dnn
 /// <summary>
 /// Initializes a new instance of the <see cref="LossLayer"/> class.
 /// </summary>
 /// <param name="shape">The shape of the layer's input tensor.</param>
 protected LossLayer(Shape shape)
     : base(1, LossLayer.CalculateOutputShape(shape))
 {
     this.NumberOfClasses = this.OutputShape.Axes.Skip(1).Aggregate(1, (total, next) => total * next);
 }