Skip to content

Commit

Permalink
[GNA] Fix identity insertion into LSTMCell (openvinotoolkit#5759)
Browse files Browse the repository at this point in the history
  • Loading branch information
elilobanova authored and rnugmanx committed Aug 26, 2021
1 parent c49bcf5 commit a4c2faf
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1680,13 +1680,8 @@ void InsertIdentityToLSTMCellPass::run() {
for (auto& input : input_to) {
auto& next_layer = input.second;
activationInputTo[input.first] = next_layer;
for (int i = next_layer->insData.size() -1; i>= 0; i--) {
auto ins = next_layer->insData[i].lock();
if (ins == output) {
next_layer->insData.erase(next_layer->insData.begin() + i);
}
}
next_layer->insData.push_back(dataPtr);
std::replace_if(std::begin(next_layer->insData), std::end(next_layer->insData),
[output](DataWeakPtr data) { return data.lock() == output; }, dataPtr);
}
input_to.clear();
input_to[activationName] = activationLayerWithQuant;
Expand Down

0 comments on commit a4c2faf

Please sign in to comment.