Removed do_rotate flag processing

This commit is contained in:
Mikhail Ryzhov 2023-03-23 12:34:28 +01:00
parent 8b81867d18
commit 45c1f800f3
2 changed files with 0 additions and 37 deletions

View File

@ -624,19 +624,6 @@ void GNAGraphCompiler::finalizeConvolution1DPrimitive(InferenceEngine::CNNLayerP
}
#ifndef DEBUG_USE_NEW_PASS
// TODO: convolution might be not the first layer in sorted order but connected via split for example - dont know
// how kaldi will handle that
if (!dnn->do_rotate_input) {
if ((inputs->getLayout() != InferenceEngine::Layout::NHWC || transpose_h_w) &&
LayerInfo(connectedInputLayer).isInput()) {
// Kaldi features are opposite orientation
dnn->do_rotate_input = true;
dnn->num_rotate_rows = effectiveStride;
dnn->num_rotate_columns = num_inputs / effectiveStride;
} else {
dnn->do_rotate_input = false;
}
}
#endif
connectOutput(layer, ptr_outputs, num_data_bytes_out);
@ -816,22 +803,6 @@ void GNAGraphCompiler::finalizeConvolution2DPrimitive(InferenceEngine::CNNLayerP
auto connectedInputLayer = connectInput(layer, ptr_inputs, num_data_bytes_in).input;
// TODO: convolution might be not the first layer in sorted order but connected via split for example - dont know
// how kaldi will handle that
if (!dnn->do_rotate_input && inputs->getLayout() != InferenceEngine::Layout::NHWC &&
LayerInfo(connectedInputLayer).isInput()) {
// Kaldi features are opposite orientation
dnn->do_rotate_input = true;
dnn->num_rotate_rows = in_channels;
if (in_height != 1) {
dnn->num_rotate_rows *= convolution._stride_y;
}
if (in_width != 1) {
dnn->num_rotate_rows *= convolution._stride_x;
}
dnn->num_rotate_columns = num_inputs / dnn->num_rotate_rows;
}
connectOutput(layer, ptr_outputs, num_data_bytes_out);
const auto kernelHW = convolution._kernel_y * convolution._kernel_x;

View File

@ -928,14 +928,6 @@ void GNAPlugin::LoadNetwork(const CNNNetwork& _network) {
}
}
if (dnn->do_rotate_input && transpose_inputs_info.empty()) {
for (auto& inputLayer : inputLayers) {
transpose_inputs_info.insert(
{inputLayer->name,
{TranspositionInfo{dnn->do_rotate_input, dnn->num_rotate_rows, dnn->num_rotate_columns}}});
}
}
// TODO: Need to remove this conversation when ngraph NCHW<->NHWC transformation is enabled
if (!transpose_inputs_info.empty()) {
ConvertTransposeMapToModel(transpose_inputs_info, inputs_ptr_->Get());