Пример #1
0
 public SoftMaxCostLayer(GPUModule gpuModule, FullyConnectedLayer previousLayer, DataLayer labelLayer, string id = "") : base(gpuModule, previousLayer, labelLayer, 0, id)
 {
     this.Size = previousLayer.Size;
     AddArray(ArrayName.CorrectlyPredictedLabels, MinibatchSize, 1);
     AddArray(ArrayName.Outputs, MinibatchSize, this.Size);
     _fullyConnectedLayer = previousLayer;
 }
Пример #2
0
 public CostLayer(GPUModule gpuModule, Layer previousLayer, DataLayer groundThruthLayer, int size, string id = "") : base(gpuModule, previousLayer, size, id)
 {
     GroundTruthLayer = groundThruthLayer;
 }
Пример #3
0
 public CostLayer(GPUModule gpuModule, Layer previousLayer, DataLayer groundThruthLayer, int size, string id = "") : base(gpuModule, previousLayer, size, id)
 {
     GroundTruthLayer = groundThruthLayer;
 }
Пример #4
0
 public DataLayer AddLabelLayer(int size, int minibatchSize = 128, int batchesPerLoad = 1)
 {
     LabelLayer = new DataLayer(_gpuModule, size, batchesPerLoad: batchesPerLoad, miniBatchSize: this._minibatchSize);
     Layers.Insert(0, LabelLayer);
     return LabelLayer;
 }
Пример #5
0
 public DataLayer AddInputLayer(int size, int minibatchSize = 128, int batchesPerLoad = 1, int sparseDataSize = 0)
 {
     if (Layers.Count != 0) throw new Exception("There are already layers in the network");
     var layer = new DataLayer(_gpuModule, size:size, batchesPerLoad:batchesPerLoad, miniBatchSize:this._minibatchSize, sparseDataSize: sparseDataSize);
     Layers.Add(layer);
     InputLayer = layer;
     return layer;
 }