// Todo: show user all possible integer solutions, given partially filled config public static int GetOutputWidth(int inWidth, int kernelWidth, int stride, int padding) { if (NeuralMath.IsEven(kernelWidth)) { return(-1); } float result = (inWidth - kernelWidth + padding * 2.0f) / (float)stride + 1.0f; if (result - (int)result < float.Epsilon) { return((int)result); } return(-1); }