public bool TryRun(float[] i_Inputs, out float[] o_Outputs) { o_Outputs = null; if (i_Inputs == null || i_Inputs.Length < m_ANNInputCount) { return false; } float[] prevLayerOutputs = i_Inputs; float[] currentLayerOutputs = null; for (int layerIndex = 0; layerIndex < m_Layers.Count; ++layerIndex) { Layer layer = m_Layers[layerIndex]; bool layerExecutionSuccess = layer.TryRun(prevLayerOutputs, out currentLayerOutputs); if (!layerExecutionSuccess) { return false; } prevLayerOutputs = currentLayerOutputs; currentLayerOutputs = null; } o_Outputs = prevLayerOutputs; return true; }