-
-
Save mdfarragher/ca924864387d39c1cbda32c5d30023f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// test one epoch on batches | |
testingError[epoch] = 0.0; | |
batchCount = 0; | |
testing_data.Batch(batchSize, (data, begin, end) => | |
{ | |
// get the current batch for testing | |
var featureBatch = features.GetSequenceBatch(sequenceLength, testing_data, begin, end); | |
var labelBatch = labels.GetBatch(testing_labels, begin, end); | |
// test the network on the batch | |
testingError[epoch] += evaluator.TestBatch( | |
new[] { | |
(features, featureBatch), | |
(labels, labelBatch) | |
} | |
); | |
batchCount++; | |
}); | |
testingError[epoch] /= batchCount; | |
Console.WriteLine($"{testingError[epoch]:F3}"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment