1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Disable fusion to output layers

This commit is contained in:
Dmitry Kurtaev
2018-07-04 15:50:39 +03:00
parent a0baae8a55
commit f25a01bb5a
2 changed files with 36 additions and 3 deletions
+4 -3
View File
@@ -2075,7 +2075,8 @@ Mat Net::forward(const String& outputName)
if (layerName.empty())
layerName = getLayerNames().back();
impl->setUpNet();
std::vector<LayerPin> pins(1, impl->getPinByAlias(layerName));
impl->setUpNet(pins);
impl->forwardToLayer(impl->getLayerData(layerName));
return impl->getBlob(layerName);
@@ -2085,13 +2086,13 @@ void Net::forward(OutputArrayOfArrays outputBlobs, const String& outputName)
{
CV_TRACE_FUNCTION();
impl->setUpNet();
String layerName = outputName;
if (layerName.empty())
layerName = getLayerNames().back();
std::vector<LayerPin> pins(1, impl->getPinByAlias(layerName));
impl->setUpNet(pins);
impl->forwardToLayer(impl->getLayerData(layerName));
LayerPin pin = impl->getPinByAlias(layerName);