diff --git a/python/n2d2/deepnet.py b/python/n2d2/deepnet.py index 773e0274..fbf777a6 100755 --- a/python/n2d2/deepnet.py +++ b/python/n2d2/deepnet.py @@ -111,10 +111,16 @@ def get_output_cells(self): Return the last N2D2 cells in the deepNet """ output = [] + """ + // Made to support several outputs but breaks regular networks exports for cell in self.N2D2().getCells(): if len(self._cells[cell].N2D2().getChildrenCells()) == 0: output.append(self._cells[cell]) return output + """ + for cell in self.N2D2().getLayers()[-1]: + output.append(self._cells[cell]) + return output def draw(self, filename): N2D2.DrawNet.draw(self._N2D2_object, filename) diff --git a/src/Export/CPP/CPP_CellExport.cpp b/src/Export/CPP/CPP_CellExport.cpp index edf45a9a..d3cb04fd 100755 --- a/src/Export/CPP/CPP_CellExport.cpp +++ b/src/Export/CPP/CPP_CellExport.cpp @@ -96,7 +96,7 @@ void N2D2::CPP_CellExport::generateActivationScaling(const Cell& cell, std::ofst const Cell_Frame_Top& cellFrame = dynamic_cast(cell); if (cellFrame.getActivation() == nullptr) { - header << "static const N2D2_Export::NoScaling " << prefix << "_SCALING;\n"; + header << "static const N2D2_Export::NoScaling<0> " << prefix << "_SCALING;\n"; return; }