1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

dnn(test): replace file content reading

This commit is contained in:
Alexander Alekhin
2019-05-29 15:29:31 +03:00
parent 0d477d7364
commit 52548bde05
5 changed files with 31 additions and 33 deletions
+6 -6
View File
@@ -96,17 +96,17 @@ public:
if (memoryLoad)
{
// Load files into a memory buffers
string dataModel;
ASSERT_TRUE(readFileInMemory(netPath, dataModel));
std::vector<char> dataModel;
readFileContent(netPath, dataModel);
string dataConfig;
std::vector<char> dataConfig;
if (hasText)
{
ASSERT_TRUE(readFileInMemory(netConfig, dataConfig));
readFileContent(netConfig, dataConfig);
}
net = readNetFromTensorflow(dataModel.c_str(), dataModel.size(),
dataConfig.c_str(), dataConfig.size());
net = readNetFromTensorflow(dataModel.data(), dataModel.size(),
dataConfig.data(), dataConfig.size());
}
else
net = readNetFromTensorflow(netPath, netConfig);