mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 03:30:34 +08:00
Fix TensorFlow->ONNX imports
This commit is contained in:
parent
d41b20b268
commit
cc584760d3
@ -63,9 +63,6 @@ int Subgraph::getInputNodeId(const Ptr<ImportGraphWrapper>& net,
|
||||
{
|
||||
CV_Assert(inpId < node->getNumInputs());
|
||||
std::string name = node->getInputName(inpId);
|
||||
// If operation produces several tensors, they are specified by index
|
||||
// after ':' character. In example, "input:0".
|
||||
name = name.substr(0, name.rfind(':'));
|
||||
const int numNodes = net->getNumNodes();
|
||||
for (int i = 0; i < numNodes; ++i)
|
||||
{
|
||||
|
@ -31,7 +31,10 @@ public:
|
||||
|
||||
virtual std::string getInputName(int idx) const CV_OVERRIDE
|
||||
{
|
||||
return node->input(idx);
|
||||
// If operation produces several tensors, they are specified by index
|
||||
// after ':' character. In example, "input:0".
|
||||
std::string name = node->input(idx);
|
||||
return name.substr(0, name.rfind(':'));
|
||||
}
|
||||
|
||||
virtual std::string getType() const CV_OVERRIDE
|
||||
|
Loading…
Reference in New Issue
Block a user