132133134135136137138139140141142
FlatLayer[] flatLayers = new FlatLayer[network.getLayers().size()]; int index = 0; for (Layer layer : network.getLayers()) { FlatLayer flatLayer = flattenLayer(layer); if (flatLayer == null) return false; flatLayers[index++] = flatLayer; }
203204205206207208209
if (biasCount > 1) return null; double[] params = { slope }; return new FlatLayer(activation, neuronCount, biasCount == 1 ? 1.0:0.0, params); }