auto output = outputs[0];
- auto concat = std::dynamic_pointer_cast<ie::ConcatLayer>(layer);
VPU_THROW_UNLESS(layer != nullptr,
+ "parseConcat expects valid CNNLayerPtr, got nullptr");
+ auto concat = std::dynamic_pointer_cast<ie::ConcatLayer>(layer);
+ VPU_THROW_UNLESS(concat != nullptr,
"{} layer with name {} must be able to convert to ie::ConcatLayer",
layer->type, layer->name);
} // namespace
void FrontEnd::parseReduce(const Model& model, const ie::CNNLayerPtr& _layer, const DataVector& inputs, const DataVector& outputs) const {
- auto layer = std::dynamic_pointer_cast<ie::ReduceLayer>(_layer);
+ VPU_THROW_UNLESS(_layer != nullptr,
+ "parseReduce expects valid CNNLayerPtr, got nullptr");
+ const auto layer = std::dynamic_pointer_cast<ie::ReduceLayer>(_layer);
VPU_THROW_UNLESS(layer != nullptr,
- "Layer {} of type {} is nullptr",
- layer->name, layer->type);
+ "Layer {} of type {} cannot be casted to ie::ReduceLayer",
+ _layer->name, _layer->type);
VPU_THROW_UNLESS(inputs.size() == 2,
"Layer {} of type {} expects {} inputs, but provided {}",
layer->name, layer->type, 2, inputs.size());
const auto& strides = inputs[3];
const auto stridesPtr = strides->content()->get<int32_t>();
VPU_THROW_UNLESS(stridesPtr != nullptr,
- "Checking {} with type {} failed: pointer for strides is null");
+ "Checking {} with type {} failed: pointer for strides is null",
+ layer->name, layer->type);
for (int i = 0; i < strides->desc().totalDimSize(); i++) {
VPU_THROW_UNLESS(stridesPtr[i] > 0,
- "Checking {} with type {} failed: negative stride is not supported");
+ "Checking {} with type {} failed: negative stride is not supported",
+ layer->name, layer->type);
}
}