Testing the data

This section details the Test function, which will show us how to test the data we have trained. We get the network prediction and track the accuracy for each label that we have with the following command:

private void Test(Volume x, int[] labels, CircularBuffer<double> accuracy, bool forward = true)
{
if (forward)
{

Forward momentum can be found with the following code:

this._net.Forward(x);
}
var prediction = this._net.GetPrediction();
for (var i = 0; i < labels.Length; i++)
{

To track the accuracy, input the following code:

accuracy.Add(labels[i] == prediction[i] ? 1.0 : 0.0);
}
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset