Skip to content

Commit

Permalink
update v8 error
Browse files Browse the repository at this point in the history
  • Loading branch information
ncdhz committed Feb 1, 2024
1 parent 11dc757 commit 431966e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Yolo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ std::vector<torch::Tensor> Yolo::prediction(torch::Tensor data)
if (strcmp(this->version.c_str(), V8) == 0)
{
torch::Tensor pT = pred.toTensor();
torch::Tensor score = std::get<0>(pT.slice(1, 4, -1).max(1, true));
data = torch::cat({pT.slice(1, 0, 4), score, pT.slice(1, 4, -1)}, 1).permute({0, 2, 1});
torch::Tensor score = std::get<0>(pT.slice(1, 4, pT.size(1)).max(1, true));
data = torch::cat({pT.slice(1, 0, 4), score, pT.slice(1, 4, pT.size(1))}, 1).permute({0, 2, 1});
}
else if (strcmp(this->version.c_str(), V6) == 0)
{
Expand Down

0 comments on commit 431966e

Please sign in to comment.