}
// Copy nGraph function
- if (graph == nullptr)
- THROW_IE_EXCEPTION << "Cannot create CNNNetwork from empty nGraph function!";
network = std::make_shared<CNNNetworkNGraphImpl>(copyFunction(graph, false, {}));
actual = network.get();
if (actual == nullptr) {
symQuant = *(intervals.begin());
}
std::set<double> divs;
- prev = 0.f;
- for (auto it = individualsG.begin(); it != individualsG.end(); it++) {
- if (prev) {
- divs.insert((*it - prev) / symQuant);
+ if (symQuant != 0.) {
+ prev = 0.f;
+ for (auto it = individualsG.begin(); it != individualsG.end(); it++) {
+ if (prev) {
+ divs.insert((*it - prev) / symQuant);
+ }
+ prev = *it;
}
- prev = *it;
}
bwquantized = true;
isSuitableDesc = false;
}
if (!isSuitableDesc) {
- supportedPrimitiveDescriptors.erase(itpd);
+ itpd = supportedPrimitiveDescriptors.erase(itpd);
} else {
itpd++;
}
weightsData = inputs[PER_SAMPLE_WEIGHTS_IDX]->cbuffer().as<const T*>();
const auto& inDataDims = inputs[0]->getTensorDesc().getDims();
- const size_t IN_BAGS_DEPTH = inDataDims.size() - 1;
const size_t OUTPUT_BAGS_NUM = outputs[0]->getTensorDesc().getDims()[0];
const size_t BATCH = 0, CHANNEL = 1, HIGHT = 0, WIDTH = 1;
- const int64_t IB = inDims[BATCH];
const int64_t IC = inDims[CHANNEL];
const int64_t IH = inDims[inDimsSize - 2];
const int64_t IW = inDims[inDimsSize - 1];
const int64_t RH = _rates[HIGHT];
const int64_t RW = _rates[WIDTH];
- int64_t ihStart = 0;
- int64_t iwStart = 0;
-
int64_t iwStep = KW + (RW - 1) * (KW - 1);
int64_t ihStep = KH + (RH - 1) * (KH - 1);
const int64_t OC_OH_OW = OC * OH_OW;
const int64_t IH_IW = IH * IW;
const int64_t IC_IH_IW = IC * IH_IW;
- const int64_t KH_KW = KH * KW;
const int64_t work_amount = OB;
isSuitableDesc = false;
}
if (!isSuitableDesc) {
- descs.erase(itd);
+ itd = descs.erase(itd);
} else {
itd++;
}
reader = new IRReader();
return OK;
}
- catch (std::exception &ex) {
+ catch (std::exception &) {
return GENERAL_ERROR;
}
}
reader = new ONNXReader();
return OK;
}
- catch (std::exception &ex) {
+ catch (std::exception &) {
return GENERAL_ERROR;
}
}
ngraph::graph_rewrite_callback callback = [](pattern::Matcher& m) {
auto interpolate = std::dynamic_pointer_cast<ngraph::opset1::Interpolate> (m.get_match_root());
+ if (!interpolate)
+ return false;
auto data_node = interpolate->input_value(0);
auto out_shape_node = std::dynamic_pointer_cast<ngraph::opset1::Constant>(interpolate->input_value(1).get_node_shared_ptr());
//
// if (!already_set) return false;
auto last_node = std::dynamic_pointer_cast<ngraph::Node>(data_node);
+ if (!last_node)
+ return false;
auto friendly_name = tile->get_friendly_name();
int num_of_tile_dims = 0;