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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user