Question: Suppose, i have performed a convolution operation with the following Kernel:

```
double[,] image = ImageDataConverter.ToDouble2d(lena);
double[,] kernel = new double[,] { { 2, 0, 0, }, 
                                   { 0,-1, 0, }, 
                                   { 0, 0,-1, }, };  
double[,] conv = Convolution.LinearConvolutionInSpatialDomain(image, kernel );  

```

It is understandable that a convolution with this kernel will give rise to some negative values in the 2d double array.

Obviously, the following method:

```
    public static void Rescale(double[,] convolve)
    {
        int imageWidth = convolve.GetLength(0);
        int imageHeight = convolve.GetLength(1);

        double maxAmp = 0.0;

        for (int j = 0; j < imageHeight; j++)
        {
            for (int i = 0; i < imageWidth; i++)
            {
                maxAmp = Math.Max(maxAmp, convolve[i, j]);
            }
        }

        double scale = 1 / maxAmp;

        for (int j = 0; j < imageHeight; j++)
        {
            for (int i = 0; i < imageWidth; i++)
            {
                double d = convolve[i, j] * scale;
                convolve[i, j] = d;
            }
        }
    }

```

won't be able to re-scale those values between 0-1. 

So, what is the standard procedure to achieve the normalization?

Answer: 
If you add a float for validation split it will output the validation loss on a seperate split off validation set. If you do not provide the validation data, which is the default, like in your case, then the running average of the training loss is returned.

The details of the fit function are described in: <https://keras.io/models/model/#fit>.
Plain loss and accuracy is always computer on the training set, as this is what guides learning. When validation loss is compuuted, it is printed as "val\_loss", and same for accuracy as "val\_accuracy". So if there is no "val" in the name, it means it has to be evaluated on the training set.