[Common] Static analysed issues. Part II.

This commit is contained in:
Nikolay Shchegolev 2020-06-09 15:08:14 +03:00 committed by Alexander Peskov
parent 2df99d4263
commit e53eb86334
5 changed files with 11 additions and 7 deletions

View File

@ -382,6 +382,9 @@ int main(int argc, char* argv[]) {
trim(strLine);
labels.push_back(strLine);
}
inputFile.close();
} else {
throw std::logic_error("Cannot read label file");
}
ClassificationResult classificationResult(outputBlob, images, batchSize, FLAGS_nt, labels);

View File

@ -63,9 +63,9 @@ ngraph::op::GenericIE::GenericIE(const ngraph::NodeVector& inputs,
: GenericIE(as_output_vector(inputs), params, type, outputs) {}
ngraph::op::GenericIE::GenericIE(const ngraph::OutputVector& inputs,
const std::map<std::string, InferenceEngine::Parameter>& params,
const std::string type, const std::vector<PortIE>& outputs)
: Op(inputs), params(params), outputs(outputs), type(type), initialized(0) {
const std::map<std::string, InferenceEngine::Parameter>& params_,
const std::string type_, const std::vector<PortIE>& outputs_)
: Op(inputs), params(params_), outputs(outputs_), type(type_), initialized(0) {
constructor_validate_and_infer_types();
}

View File

@ -179,7 +179,9 @@ CNNNetwork details::ReadNetwork(const std::string& modelPath, const std::string&
THROW_IE_EXCEPTION << "Weights file " << bPath << " cannot be opened!";
// read model with weights
return reader->read(modelStream, binStream, exts);
auto network = reader->read(modelStream, binStream, exts);
modelStream.close();
return network;
}
// read model without weights
return reader->read(modelStream, exts);

View File

@ -182,8 +182,6 @@ void argmax_many_classes_has_axis(const float* src_data, float* dst_data, Shape
vmask_type vmask;
int s_index = i0 * dim * after_num + ib1 * block_size;
std::memset(reinterpret_cast<void*>(&vmax_values[0]), 0, sizeof(vmax_values));
auto vswap_func = [&](int index1, int index2) {
vtmp = vmax_values[index1];
vmax_values[index1] = _mm_uni_blendv_ps(vmax_values[index1], vmax_values[index2], vmask);

View File

@ -667,7 +667,8 @@ private:
};
MKLDNNNormalizeNode::MKLDNNNormalizeNode(const InferenceEngine::CNNLayerPtr& layer, const mkldnn::engine& eng, MKLDNNWeightsSharing::Ptr &cache)
: MKLDNNNode(layer, eng, cache) {}
: MKLDNNNode(layer, eng, cache), src_data_size(0lu), dst_data_size(0lu), weights_data_size(0lu),
input_prec(Precision::UNSPECIFIED), output_prec(Precision::UNSPECIFIED), weights_prec(Precision::UNSPECIFIED) {}
void MKLDNNNormalizeNode::getSupportedDescriptors() {
if (!descs.empty())