From c577f2c6a3b4ddb6ba87a882723c53a248afbeba Mon Sep 17 00:00:00 2001 From: telsoa01 Date: Fri, 31 Aug 2018 09:22:23 +0100 Subject: Release 18.08 --- tests/MnistDatabase.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/MnistDatabase.cpp') diff --git a/tests/MnistDatabase.cpp b/tests/MnistDatabase.cpp index 5c10b0c2b4..2ca39ef6de 100644 --- a/tests/MnistDatabase.cpp +++ b/tests/MnistDatabase.cpp @@ -47,7 +47,7 @@ std::unique_ptr MnistDatabase::GetTestCaseData(uns unsigned int magic, num, row, col; - // check the files have the correct header + // Checks the files have the correct header. imageStream.read(reinterpret_cast(&magic), sizeof(magic)); if (magic != 0x03080000) { @@ -61,8 +61,8 @@ std::unique_ptr MnistDatabase::GetTestCaseData(uns return nullptr; } - // Endian swap image and label file - All the integers in the files are stored in MSB first(high endian) format, - // hence need to flip the bytes of the header if using it on Intel processors or low-endian machines + // Endian swaps the image and label file - all the integers in the files are stored in MSB first(high endian) + // format, hence it needs to flip the bytes of the header if using it on Intel processors or low-endian machines labelStream.read(reinterpret_cast(&num), sizeof(num)); imageStream.read(reinterpret_cast(&num), sizeof(num)); EndianSwap(num); @@ -71,7 +71,7 @@ std::unique_ptr MnistDatabase::GetTestCaseData(uns imageStream.read(reinterpret_cast(&col), sizeof(col)); EndianSwap(col); - // read image and label into memory + // Reads image and label into memory. imageStream.seekg(testCaseId * g_kMnistImageByteSize, std::ios_base::cur); imageStream.read(reinterpret_cast(&I[0]), g_kMnistImageByteSize); labelStream.seekg(testCaseId, std::ios_base::cur); -- cgit v1.2.1