Skip to content

Commit bf8136e

Browse files
committed
Merge pull request opencv#17849 from dkurt:fix_17848
2 parents d41b20b + cc58476 commit bf8136e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

modules/dnn/src/graph_simplifier.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ int Subgraph::getInputNodeId(const Ptr<ImportGraphWrapper>& net,
6363
{
6464
CV_Assert(inpId < node->getNumInputs());
6565
std::string name = node->getInputName(inpId);
66-
// If operation produces several tensors, they are specified by index
67-
// after ':' character. In example, "input:0".
68-
name = name.substr(0, name.rfind(':'));
6966
const int numNodes = net->getNumNodes();
7067
for (int i = 0; i < numNodes; ++i)
7168
{

modules/dnn/src/tensorflow/tf_graph_simplifier.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ class TFNodeWrapper : public ImportNodeWrapper
3131

3232
virtual std::string getInputName(int idx) const CV_OVERRIDE
3333
{
34-
return node->input(idx);
34+
// If operation produces several tensors, they are specified by index
35+
// after ':' character. In example, "input:0".
36+
std::string name = node->input(idx);
37+
return name.substr(0, name.rfind(':'));
3538
}
3639

3740
virtual std::string getType() const CV_OVERRIDE

0 commit comments

Comments
 (0)