Skip to content

Commit

Permalink
[tmva] fix bug in reshape operator when it is used as the first opera…
Browse files Browse the repository at this point in the history
…tor of the model
  • Loading branch information
uristern123 authored and lmoneta committed Aug 16, 2023
1 parent 8fa423d commit 4f0450b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tmva/sofie/inc/TMVA/ROperator_Reshape.hxx
Expand Up @@ -193,9 +193,6 @@ public:
ConvertShapeToString(fShapeOutput) + " and input is " +
ConvertShapeToString(fShapeInput));
}
for (auto &i : fShapeOutput) {
length *= i;
}
std::stringstream out;
std::string opName = "Reshape";
if (fOpMode == Flatten)
Expand All @@ -206,8 +203,8 @@ public:
opName = "Unsquueze";

out << SP << "///--------" << opName << " operator\n" << std::endl;
out << SP << "std::copy( fTensor_" << fNData << ".begin(), fTensor_" << fNData << ".end(), fTensor_" << fNOutput
<< ".begin() );\n";
out << SP << "std::copy( tensor_" << fNData << ", tensor_" << fNData << " + " << length << ", " << "tensor_" << fNOutput
<< ");\n";
return out.str();
}
};
Expand Down

0 comments on commit 4f0450b

Please sign in to comment.