Skip to content

Commit

Permalink
Minor Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnick committed Jun 1, 2021
1 parent 3104cdf commit c5c520c
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,17 @@ class ParameterResultCustomBlobTest : public ParameterResultSubgraphTest {
auto inputsInfo = cnnNetwork.getInputsInfo().begin()->second;
std::string inputName = cnnNetwork.getInputsInfo().begin()->first;

float* customInpData = new float[elementsCount];
std::vector<float> customInpData(elementsCount);
auto inpBlobData = inputBlob->buffer().as<const float *>();
std::copy(inpBlobData, inpBlobData + elementsCount, customInpData);
std::copy(inpBlobData, inpBlobData + elementsCount, customInpData.begin());

auto& tensorDesc = inputsInfo->getTensorDesc();
auto customBlob = make_shared_blob<float>(tensorDesc, customInpData, elementsCount * sizeof(float));
auto customBlob = make_shared_blob<float>(tensorDesc, customInpData.data(), elementsCount);
inferRequest.SetBlob(inputName, customBlob);

inferRequest.Infer();

ParameterResultSubgraphTest::Validate();

delete[] customInpData;
}
}
void Validate() override {
Expand Down

0 comments on commit c5c520c

Please sign in to comment.